回退 'Pull Request !6 : Update to 6.0.3.4-1'

This commit is contained in:
木得感情的openEuler机器人 2021-12-20 14:05:28 +00:00 committed by Gitee
parent 07ce53ab8f
commit e2a92a3bc2
6 changed files with 68 additions and 46 deletions

BIN
actioncable-5.2.4.4.gem Normal file

Binary file not shown.

Binary file not shown.

37
recompile_js.rb Normal file
View File

@ -0,0 +1,37 @@
require 'pathname'
require 'sprockets'
require 'coffee-script'
require 'action_cable'
dir = File.dirname(__FILE__)
root_path = Pathname.new(dir)
destination_path = root_path.join("lib/assets/compiled")
puts 'Compiling Action Cable assets...'
precompile_list = %w(action_cable.js)
environment = Sprockets::Environment.new
environment.gzip = false
Pathname.glob(root_path.join("app/assets/*/")) do |subdir|
environment.append_path subdir
end
compile_path = root_path.join("tmp/sprockets")
compile_path.rmtree if compile_path.exist?
compile_path.mkpath
manifest = Sprockets::Manifest.new(environment.index, compile_path)
manifest.compile(precompile_list)
destination_path.rmtree if destination_path.exist?
manifest.assets.each do |path, fingerprint_path|
destination_path.join(path).dirname.mkpath
FileUtils.cp(compile_path.join(fingerprint_path), destination_path.join(path))
end
puts 'Done'

View File

@ -1,58 +1,47 @@
%global pkg_name %{name}
%global gem_name actioncable %global gem_name actioncable
%global gem_require_name %{gem_name} %global recompile_js 1
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 6.0.3.4 Version: 5.2.4.4
Release: 1 Release: 1
Summary: WebSocket framework for Rails Summary: WebSocket framework for Rails
Group: Development/Languages
License: MIT License: MIT
URL: https://rubyonrails.org URL: http://rubyonrails.org
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://github.com/rails/rails/archive/refs/tags/v%{version}.tar.gz Source1: https://github.com/rails/rails/archive/v%{version}.tar.gz
# Recompile with script extracted from
Requires: ruby(release) # https://github.com/rails/rails/blob/71d406697266fc2525706361b86aeb85183fe4c7/actioncable/Rakefile
Requires: ruby >= 2.5.0 Source2: recompile_js.rb
Requires: ruby(rubygems) BuildRequires: ruby(release) rubygems-devel > 1.3.1 ruby >= 2.2.2
Requires: rubygem(actionpack) = 6.0.3.4 BuildRequires: rubygem(actionpack) = %{version} rubygem(mocha) rubygem(nio4r) rubygem(puma)
Requires: rubygem(nio4r) >= 2.0 BuildRequires: %{_bindir}/redis-server rubygem(redis) rubygem(websocket-driver)
Requires: rubygem(nio4r) < 3 %if 0%{?recompile_js} > 0
Requires: rubygem(websocket-driver) >= 0.6.1 BuildRequires: rubygem(coffee-script) rubygem(sprockets) nodejs
BuildRequires: ruby(release) %endif
BuildRequires: ruby >= 2.5.0
BuildRequires: rubygems-devel
BuildRequires: %{_bindir}/redis-server rubygem(redis)
BuildArch: noarch BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
Obsoletes: tfm-ror52-rubygem-%{gem_name} <= 5.2.1
%description %description
Structure many real-time application concerns into channels over a single Structure many real-time application concerns into channels over a single
WebSocket connection. WebSocket connection.
%package doc %package doc
Summary: Documentation for %{pkg_name} Summary: Documentation for %{name}
Group: Documentation Requires: %{name} = %{version}-%{release}
Requires: %{pkg_name} = %{version}-%{release}
BuildArch: noarch BuildArch: noarch
%description doc %description doc
Documentation for %{pkg_name}. Documentation for %{name}.
%prep %prep
gem unpack %{SOURCE0} gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version} -a 1
%setup -q -D -T -n %{gem_name}-%{version} ln -s rails-%{version}/%{gem_name}/app app
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build %build
%if 0%{?recompile_js} > 0
cp -a %{SOURCE2} .
rm -rf lib/assets/compiled
RUBYOPT=-Ilib ruby recompile_js.rb
%endif
gem build %{gem_name}.gemspec gem build %{gem_name}.gemspec
%gem_install %gem_install
%install %install
@ -68,14 +57,13 @@ mv test/client_test.rb{,.disable}
mv test/subscription_adapter/postgresql_test.rb{,.disable} mv test/subscription_adapter/postgresql_test.rb{,.disable}
REDIS_DIR=$(mktemp -d) REDIS_DIR=$(mktemp -d)
redis-server --dir $REDIS_DIR --pidfile $REDIS_DIR/redis.pid --daemonize yes redis-server --dir $REDIS_DIR --pidfile $REDIS_DIR/redis.pid --daemonize yes
ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb"' ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
kill -INT $(cat $REDIS_DIR/redis.pid) || echo end kill -INT $(cat $REDIS_DIR/redis.pid) || echo end
popd popd
%files %files
%dir %{gem_instdir} %dir %{gem_instdir}
%license %{gem_instdir}/MIT-LICENSE %license %{gem_instdir}/MIT-LICENSE
%{gem_instdir}/app
%{gem_libdir} %{gem_libdir}
%exclude %{gem_cache} %exclude %{gem_cache}
%{gem_spec} %{gem_spec}
@ -86,9 +74,6 @@ popd
%doc %{gem_instdir}/README.md %doc %{gem_instdir}/README.md
%changelog %changelog
* Mon Jun 07 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 6.0.3.4-1
- Update to 6.0.3.4
* Mon Feb 8 2021 sunguoshuai <sunguoshuai@huawei.com> - 5.2.4.4-1 * Mon Feb 8 2021 sunguoshuai <sunguoshuai@huawei.com> - 5.2.4.4-1
- Upgrade to 5.2.4.4 - Upgrade to 5.2.4.4

BIN
v5.2.4.4.tar.gz Normal file

Binary file not shown.

Binary file not shown.