concord 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ # v0.1.0 2013-05-15
2
+
3
+ * [change] Set default attribute visibility to protected
4
+
1
5
  # v0.0.3 2013-03-08
2
6
 
3
7
  * [fix] 1.9.2 visibility problem
@@ -1,27 +1,26 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  group :development do
4
- gem 'rake', '~> 10.0.3'
4
+ gem 'rake', '~> 10.0.4'
5
5
  gem 'rspec', '~> 2.13.0'
6
- gem 'yard', '~> 0.8.5'
6
+ gem 'yard', '~> 0.8.6.1'
7
7
  end
8
8
 
9
9
  group :yard do
10
- gem 'kramdown', '~> 0.14.2'
10
+ gem 'kramdown', '~> 1.0.1'
11
11
  end
12
12
 
13
13
  group :guard do
14
- gem 'guard', '~> 1.6.2'
14
+ gem 'guard', '~> 1.8.0'
15
15
  gem 'guard-bundler', '~> 1.0.0'
16
- gem 'guard-rspec', '~> 2.4.1'
16
+ gem 'guard-rspec', '~> 2.5.4'
17
17
 
18
18
  # file system change event handling
19
+ gem 'listen', '~> 1.0.2'
19
20
  gem 'rb-fchange', '~> 0.0.6', :require => false
20
21
  gem 'rb-fsevent', '~> 0.9.3', :require => false
21
22
  gem 'rb-inotify', '~> 0.9.0', :require => false
22
23
 
23
- gem 'listen', '~> 0.7.3'
24
-
25
24
  # notification handling
26
25
  gem 'libnotify', '~> 0.8.0', :require => false
27
26
  gem 'rb-notifu', '~> 0.0.4', :require => false
@@ -29,14 +28,15 @@ group :guard do
29
28
  end
30
29
 
31
30
  group :metrics do
32
- gem 'flay', '~> 2.1.0'
33
- gem 'flog', '~> 3.2.2'
31
+ gem 'backports', '~> 3.3', '>= 3.3.0'
32
+ gem 'coveralls', '~> 0.6.6'
33
+ gem 'flay', '~> 2.2.0'
34
+ gem 'flog', '~> 4.0.0'
34
35
  gem 'reek', '~> 1.3.1', :git => 'https://github.com/troessner/reek.git'
35
- gem 'metric_fu-roodi', '~> 2.2.1'
36
- gem 'yardstick', '~> 0.9.4'
36
+ gem 'simplecov', '~> 0.7.1'
37
+ gem 'yardstick', '~> 0.9.6'
37
38
 
38
- platforms :ruby_18, :ruby_19 do
39
- # this indirectly depends on ffi which does not build on ruby-head
39
+ platforms :ruby_19 do
40
40
  gem 'yard-spellcheck', '~> 0.1.5'
41
41
  end
42
42
 
@@ -44,10 +44,6 @@ group :metrics do
44
44
  gem 'mutant', '~> 0.2.20'
45
45
  end
46
46
 
47
- platforms :mri_19 do
48
- gem 'simplecov', '~> 0.7.1'
49
- end
50
-
51
47
  platforms :rbx do
52
48
  gem 'pelusa', '~> 0.2.2'
53
49
  end
@@ -59,6 +55,6 @@ end
59
55
 
60
56
  platform :jruby do
61
57
  group :jruby do
62
- gem 'jruby-openssl', '~> 0.8.2'
58
+ gem 'jruby-openssl', '~> 0.8.5'
63
59
  end
64
60
  end
data/README.md CHANGED
@@ -18,6 +18,7 @@ class ComposedObject
18
18
  # @api private
19
19
  #
20
20
  attr_reader :foo
21
+ protected :foo
21
22
 
22
23
  # Return bar
23
24
  #
@@ -26,6 +27,7 @@ class ComposedObject
26
27
  # @api private
27
28
  #
28
29
  attr_reader :bar
30
+ protected :bar
29
31
 
30
32
  # Initialize object
31
33
  #
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'concord'
5
- s.version = '0.0.3'
5
+ s.version = '0.1.0'
6
6
  s.authors = ['Markus Schirp']
7
7
  s.email = ['mbj@seonic.net']
8
8
  s.homepage = 'https://github.com/mbj/composition'
@@ -1,3 +1,3 @@
1
1
  ---
2
- threshold: 2
3
- total_score: 8.0
2
+ threshold: 5
3
+ total_score: 13.0
@@ -6,7 +6,7 @@ UncommunicativeParameterName:
6
6
  - !ruby/regexp /^.$/
7
7
  - !ruby/regexp /[0-9]$/
8
8
  - !ruby/regexp /[A-Z]/
9
- LargeClass:
9
+ TooManyMethods:
10
10
  max_methods: 14
11
11
  enabled: true
12
12
  exclude: []
@@ -49,11 +49,11 @@ NestedIterators:
49
49
  exclude: []
50
50
  enabled: true
51
51
  max_allowed_nesting: 1
52
- LongMethod:
52
+ TooManyStatements:
53
53
  max_statements: 5
54
54
  exclude: []
55
55
  enabled: true
56
- Duplication:
56
+ DuplicateMethodCall:
57
57
  allow_calls: []
58
58
  exclude: []
59
59
  enabled: true
@@ -81,7 +81,7 @@ DataClump:
81
81
  enabled: true
82
82
  max_copies: 0
83
83
  min_clump_size: 2
84
- ControlCouple:
84
+ ControlParameter:
85
85
  exclude: []
86
86
  enabled: true
87
87
  LongYieldList:
@@ -66,7 +66,7 @@ private
66
66
  def define_readers(descendant)
67
67
  attribute_names = names
68
68
  descendant.send(:attr_reader, *attribute_names)
69
- descendant.send(:public, *attribute_names)
69
+ descendant.send(:protected, *attribute_names)
70
70
  end
71
71
 
72
72
  # Define initializer
@@ -19,21 +19,29 @@ describe Concord do
19
19
  unless Devtools.jruby?
20
20
  it 'sets initializer correctly' do
21
21
  klass = Class.new
22
- # Nicher way to assert this?
22
+ # Nicer way to assert this?
23
23
  klass.should_receive(:class_eval) do |code, file, line|
24
24
  file.should eql(File.expand_path('../../../../lib/concord.rb', __FILE__))
25
- line.should be(82)
25
+ line.should be(83)
26
26
  end
27
27
  klass.send(:include, Concord.new)
28
28
  end
29
29
  end
30
30
  end
31
31
 
32
+ context 'visibiluty' do
33
+ it 'should set attribute readers to public' do
34
+ klass = Class.new
35
+ klass.send(:include, Concord.new(:foo))
36
+ klass.protected_instance_methods.map(&:to_sym).should == [:foo]
37
+ end
38
+ end
39
+
32
40
  context 'attribute behavior' do
33
41
  subject { instance_a }
34
42
 
35
- its(:foo) { should be(foo) }
36
- its(:bar) { should be(bar) }
43
+ specify { subject.send(:foo).should be(foo) }
44
+ specify { subject.send(:bar).should be(bar) }
37
45
  end
38
46
 
39
47
  context 'equalization behavior' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-08 00:00:00.000000000 Z
12
+ date: 2013-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: adamantium
@@ -64,8 +64,8 @@ files:
64
64
  - config/flay.yml
65
65
  - config/flog.yml
66
66
  - config/mutant.yml
67
+ - config/reek.yml
67
68
  - config/roodi.yml
68
- - config/site.reek
69
69
  - config/yardstick.yml
70
70
  - lib/concord.rb
71
71
  - spec/spec_helper.rb