tax_generator 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c747d61bb720bf5072dc9e9ec0870d11974e31c3
4
- data.tar.gz: 971979df05fb6b2d3632f24b93c62ed318745ad4
3
+ metadata.gz: ebca2ea57fc475ca090d59931aa1fb5e03ebe670
4
+ data.tar.gz: 842a48f3c52909c6f5efb9954626b9135a057d6b
5
5
  SHA512:
6
- metadata.gz: d0463ac2a1ce210da8b8e5ae4ea3348695c3d50e3e4a2bd526c7a05d8abe161cbdb26e02cd9bdceea1e7eed70928d563b5558bfa26d886899ce97be379916dc8
7
- data.tar.gz: 94489169e099c7bf427d3693571c31ee7e508f680f1a078e8ef73c903f7fba861e82feae9f9db37341199ac80de6e440c9cfb16d26b18e11b983c3cb5014f49f
6
+ metadata.gz: 43b6403e00263f0c203a4121d98fa394e727ece241d68af14dbdb4d2aab98a7d6b750489f5982606e34b58427a241b7b627b64579599ee503f1d42a10dcebbf3
7
+ data.tar.gz: f29351e59eee725744c37ce1ee1ea858343e0d520d702f24756c774f6eb68ef8cfd8939bbea946d10bbe4fadca444c799d5e6ced20999c15e00fe758bc161ada
data/README.md CHANGED
@@ -3,6 +3,12 @@ tax_generator
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/tax_generator.svg)](http://badge.fury.io/rb/tax_generator) [![Gem Downloads](https://ruby-gem-downloads-badge.herokuapp.com/tax_generator?type=total)](https://github.com/bogdanRada/tax_generator) [![Analytics](https://ga-beacon.appspot.com/UA-72570203-1/bogdanRada/tax_generator)](https://github.com/bogdanRada/tax_generator)
5
5
 
6
+ NEW Improvements in version 0.6.0
7
+ ---------------------------------
8
+
9
+ - a lot of refactoring and bug fixes
10
+ - removed Celluloid in favor of Concurrent-Ruby for better performance
11
+
6
12
  Description
7
13
  -----------
8
14
 
@@ -25,11 +31,12 @@ Requirements
25
31
 
26
32
  1. [Ruby 1.9.x or Ruby 2.x.x](http://www.ruby-lang.org)
27
33
  2. [ActiveSuport >= 4.2.0](https://rubygems.org/gems/activesupport)
28
- 3. [celluloid >= 0.16.0](https://github.com/celluloid/celluloid)
29
- 4. [celluloid-pmap >= 0.2.2](https://github.com/jwo/celluloid-pmap)
34
+ 3. [concurrent-ruby >= 1.0](https://github.com/celluloid/celluloid)
35
+ 4. [concurrent-ruby-edge >= 0.2](https://github.com/jwo/celluloid-pmap)
30
36
  5. [nokogiri >= 1.6.7](https://github.com/sparklemotion/nokogiri)
31
37
  6. [slop >= 4.2.1](https://github.com/leejarvis/slop)
32
38
  7. [rubytree >= 0.9.6](https://github.com/evolve75/RubyTree)
39
+ 8. [tilt >= 2.0](https://github.com/rtomayko/tilt)
33
40
 
34
41
  Compatibility
35
42
  -------------
data/Rakefile CHANGED
@@ -23,5 +23,5 @@ task default: [:all]
23
23
 
24
24
  desc 'Test the plugin under all supported Rails versions.'
25
25
  task :all do |_t|
26
- exec('bundle exec rubocop -a . && bundle exec inch --pedantic && bundle exec yard stats --list-undoc && bundle exec rake spec')
26
+ exec('bundle exec rake spec')
27
27
  end
@@ -17,7 +17,7 @@ module TaxGenerator
17
17
  # minor release version
18
18
  MINOR = 6
19
19
  # tiny release version
20
- TINY = 0
20
+ TINY = 1
21
21
  # prelease version ( set this only if it is a prelease)
22
22
  PRE = nil
23
23
 
@@ -5,7 +5,7 @@ describe TaxGenerator::FileCreator do
5
5
  let(:output_folder) {"some_other_path" }
6
6
  let(:destinations_file_path) { "some_path" }
7
7
  let(:destination_xml) { "some_xml" }
8
- let(:subject) { TaxGenerator::FileCreator.new }
8
+
9
9
  let(:first_destination) { "some destination" }
10
10
 
11
11
  let(:fake_node) { mock }
@@ -16,6 +16,7 @@ describe TaxGenerator::FileCreator do
16
16
 
17
17
 
18
18
  let(:job) { { atlas_id: atlas_id_value, taxonomy: fake_node, destination: first_destination, output_folder: output_folder } }
19
+
19
20
  before(:each) do
20
21
  destination_xml.stubs(:at_xpath).returns(fake_node)
21
22
  destination_xml.stubs(:xpath).returns([fake_node])
@@ -27,12 +28,13 @@ describe TaxGenerator::FileCreator do
27
28
  fake_tilt.stubs(:render).returns(true)
28
29
  subject.stubs(:mark_job_completed).returns(true)
29
30
  default_processor.stubs(:all_workers_finished).returns(false)
31
+ default_processor.stubs(:register_worker_for_job).returns(true)
30
32
  end
33
+ let(:subject) {
34
+ default_processor.stubs(:register_worker_for_job).returns(true)
35
+ TaxGenerator::FileCreator.new(*[job, default_processor]) }
31
36
 
32
37
  context 'checks the job keys' do
33
- before(:each) do
34
- subject.work(job, default_processor)
35
- end
36
38
 
37
39
  specify { expect(subject.job).to eq job.stringify_keys }
38
40
  specify { expect(subject.processor).to eq default_processor }
@@ -56,15 +58,9 @@ describe TaxGenerator::FileCreator do
56
58
 
57
59
  context "job related " do
58
60
 
59
- before(:each) do
60
-
61
- subject.work(job, default_processor)
62
- default_processor.stubs(:register_worker_for_job).returns(true)
63
- end
64
61
 
65
62
  it 'gets start work' do
66
63
  details = {details: fake_node, root: root}
67
- Actor.stubs(:current).returns(subject)
68
64
  subject.stubs(:fetch_atlas_details).returns(details)
69
65
  fake_tilt.stubs(:render).with(subject,details).returns(true)
70
66
  subject.start_work
@@ -6,36 +6,10 @@ describe TaxGenerator::Processor do
6
6
  let(:workers) { TaxGenerator::FileCreator.new }
7
7
 
8
8
  before(:each) do
9
- Celluloid::SupervisionGroup.stubs(:run!).returns(actor_pool)
10
- actor_pool.stubs(:pool).returns(workers)
11
- Actor.current.stubs(:link).returns(true)
12
- end
13
-
14
- context "intialize" do
15
-
16
- it 'boots the celluloid' do
17
- Celluloid.expects(:boot).returns(true)
18
- TaxGenerator::Processor.new
19
- end
20
-
21
- it 'runs the supervision group' do
22
- Celluloid::SupervisionGroup.expects(:run!).returns(actor_pool)
23
- TaxGenerator::Processor.new
24
- end
25
-
26
- it 'creates the pool of workers' do
27
- actor_pool.expects(:pool).with(TaxGenerator::FileCreator, as: :workers, size: 50).returns(workers)
28
- TaxGenerator::Processor.new
29
- end
30
-
31
- it "links the actor to the current actor" do
32
- Actor.current.stubs(:link).returns(true)
33
- TaxGenerator::Processor.new
34
- end
35
-
36
9
 
37
10
  end
38
11
 
12
+
39
13
  context "intialize" do
40
14
 
41
15
  specify { expect(subject.jobs).to eq({}) }
data/spec/spec_helper.rb CHANGED
@@ -41,11 +41,3 @@ RSpec.configure do |config|
41
41
  end
42
42
  end
43
43
  end
44
-
45
- Celluloid.logger = nil
46
-
47
- at_exit do
48
- Celluloid::Actor.all.each do |actor|
49
- Celluloid::Actor.kill(actor)
50
- end
51
- end
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_runtime_dependency 'concurrent-ruby', '~> 1.0', '>= 1.0'
22
22
  s.add_runtime_dependency 'concurrent-ruby-edge', '~> 0.2' , '>= 0.2'
23
23
  s.add_runtime_dependency 'slop', '~> 4.2', '>= 4.2.1'
24
- s.add_runtime_dependency 'activesupport', '~> 4.2', '>= 4.2.5'
24
+ s.add_runtime_dependency 'activesupport', '>= 4.1', '>= 4.1.0'
25
25
  s.add_runtime_dependency 'rubytree', '~> 0.9', '>= 0.9.6'
26
26
  s.add_runtime_dependency 'tilt', '~> 2.0', '>= 2.0.1'
27
27
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tax_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-27 00:00:00.000000000 Z
11
+ date: 2016-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -94,22 +94,22 @@ dependencies:
94
94
  name: activesupport
95
95
  requirement: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - "~>"
97
+ - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: '4.2'
99
+ version: '4.1'
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: 4.2.5
102
+ version: 4.1.0
103
103
  type: :runtime
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - "~>"
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '4.2'
109
+ version: '4.1'
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
- version: 4.2.5
112
+ version: 4.1.0
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rubytree
115
115
  requirement: !ruby/object:Gem::Requirement