Compare commits
10 Commits
07ce53ab8f
...
ac59fa9766
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac59fa9766 | ||
|
|
57b380ecee | ||
|
|
440c4479f1 | ||
|
|
8c8f679a2f | ||
|
|
1922495963 | ||
|
|
b078c6f4e7 | ||
|
|
2040312e59 | ||
|
|
f85ca626ad | ||
|
|
3d0a4528c4 | ||
|
|
e2a92a3bc2 |
Binary file not shown.
BIN
actioncable-7.0.7-app.txz
Normal file
BIN
actioncable-7.0.7-app.txz
Normal file
Binary file not shown.
BIN
actioncable-7.0.7-tests.txz
Normal file
BIN
actioncable-7.0.7-tests.txz
Normal file
Binary file not shown.
BIN
actioncable-7.0.7.gem
Normal file
BIN
actioncable-7.0.7.gem
Normal file
Binary file not shown.
BIN
rails-7.0.7-tools.txz
Normal file
BIN
rails-7.0.7-tools.txz
Normal file
Binary file not shown.
37
recompile_js.rb
Normal file
37
recompile_js.rb
Normal 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'
|
||||||
@ -1,58 +1,72 @@
|
|||||||
%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: 7.0.7
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: WebSocket framework for Rails
|
Summary: WebSocket framework for Rails
|
||||||
Group: Development/Languages
|
License: MIT
|
||||||
License: MIT
|
URL: http://rubyonrails.org
|
||||||
URL: https://rubyonrails.org
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
# The gem doesn't ship with the test suite, you may check it out like so
|
||||||
Source1: https://github.com/rails/rails/archive/refs/tags/v%{version}.tar.gz
|
# git clone https://github.com/rails/rails.git
|
||||||
|
# cd rails/actioncable && git archive -v -o actioncable-7.0.4-tests.txz v7.0.4 test/
|
||||||
|
Source1: %{gem_name}-%{version}-tests.txz
|
||||||
|
# The source code of pregenerated JS files is not packaged.
|
||||||
|
# You may get them like so
|
||||||
|
# git clone https://github.com/rails/rails.git
|
||||||
|
# cd rails/actioncable && git archive -v -o actioncable-7.0.4-app.txz v7.0.4 app/
|
||||||
|
Source2: %{gem_name}-%{version}-app.txz
|
||||||
|
# Recompile with script extracted from
|
||||||
|
# https://github.com/rails/rails/blob/71d406697266fc2525706361b86aeb85183fe4c7/actioncable/Rakefile
|
||||||
|
Source3: recompile_js.rb
|
||||||
|
# The tools are needed for the test suite, are however unpackaged in gem file.
|
||||||
|
# You may get them like so
|
||||||
|
# git clone https://github.com/rails/rails.git --no-checkout
|
||||||
|
# cd rails && git archive -v -o rails-7.0.4-tools.txz v7.0.4 tools/
|
||||||
|
Source4: rails-%{version}-tools.txz
|
||||||
|
|
||||||
Requires: ruby(release)
|
BuildRequires: ruby(release)
|
||||||
Requires: ruby >= 2.5.0
|
BuildRequires: rubygems-devel > 1.3.1
|
||||||
Requires: ruby(rubygems)
|
BuildRequires: ruby >= 2.2.2
|
||||||
Requires: rubygem(actionpack) = 6.0.3.4
|
BuildRequires: rubygem(actionpack) = %{version}
|
||||||
Requires: rubygem(nio4r) >= 2.0
|
BuildRequires: rubygem(mocha)
|
||||||
Requires: rubygem(nio4r) < 3
|
BuildRequires: rubygem(nio4r)
|
||||||
Requires: rubygem(websocket-driver) >= 0.6.1
|
BuildRequires: rubygem(puma)
|
||||||
BuildRequires: ruby(release)
|
BuildRequires: %{_bindir}/redis-server
|
||||||
BuildRequires: ruby >= 2.5.0
|
BuildRequires: rubygem(redis)
|
||||||
BuildRequires: rubygems-devel
|
BuildRequires: rubygem(hiredis) >= 0.6.3
|
||||||
BuildRequires: %{_bindir}/redis-server rubygem(redis)
|
BuildRequires: rubygem(websocket-driver)
|
||||||
|
%if 0%{?recompile_js} > 0
|
||||||
BuildArch: noarch
|
BuildRequires: rubygem(coffee-script)
|
||||||
Provides: rubygem(%{gem_name}) = %{version}
|
BuildRequires: rubygem(sprockets)
|
||||||
|
BuildRequires: nodejs
|
||||||
Obsoletes: tfm-ror52-rubygem-%{gem_name} <= 5.2.1
|
%endif
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
%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}
|
%setup -q -n %{gem_name}-%{version}%{?prerelease} -b1 -a2 -b4
|
||||||
|
|
||||||
%setup -q -D -T -n %{gem_name}-%{version}
|
|
||||||
|
|
||||||
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gem build %{gem_name}.gemspec
|
%if 0%{?recompile_js} > 0
|
||||||
|
cp -a %{SOURCE3} .
|
||||||
|
rm -rf lib/assets/compiled
|
||||||
|
RUBYOPT=-Ilib ruby recompile_js.rb
|
||||||
|
%endif
|
||||||
|
|
||||||
|
gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec
|
||||||
%gem_install
|
%gem_install
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -62,23 +76,23 @@ cp -a .%{gem_dir}/* \
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
pushd .%{gem_instdir}
|
pushd .%{gem_instdir}
|
||||||
tar xzvf %{SOURCE1}
|
ln -s %{_builddir}/tools ..
|
||||||
ln -s rails-%{version}/%{gem_name}/test test
|
mv %{_builddir}/test .
|
||||||
mv test/client_test.rb{,.disable}
|
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)
|
||||||
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}
|
||||||
|
%{gem_instdir}/app
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc %{gem_docdir}
|
%doc %{gem_docdir}
|
||||||
@ -86,8 +100,14 @@ 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
|
* Thu Aug 17 2023 xu_ping <707078654@qq.com> - 7.0.7-1
|
||||||
- Update to 6.0.3.4
|
- Upgrade to version 7.0.7
|
||||||
|
|
||||||
|
* Thu Jan 19 2023 wangkai <wangkai385@h-partners.com> - 7.0.4-1
|
||||||
|
- Upgrade to version 7.0.4
|
||||||
|
|
||||||
|
* Wed May 04 2022 wangkerong <wangkerong@h-partners.com> - 6.1.4.1-1
|
||||||
|
- Upgrade to 6.1.4.1
|
||||||
|
|
||||||
* 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
v6.0.3.4.tar.gz
BIN
v6.0.3.4.tar.gz
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user