strudel 0.1.3 → 1.0.0

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,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NjVlNTFlOWU5YmJiZDFjZDFmZGQ5YWEwYzJjMzJjMmIzNGEzNGM4MQ==
5
- data.tar.gz: !binary |-
6
- MTc5ZTM2YmQxNzFmMjM5M2VkZDc0ZjY4YWQ5YmU5ZjBjMjlmMjgzMQ==
2
+ SHA256:
3
+ metadata.gz: 9079d5282e709ae5c7ae25bf3e0798fcb18ba4d7a4b6e812c4550f14c9050ee0
4
+ data.tar.gz: 7527860dd73a27c326578b26a5faa55e3b12475556bed7ee1fb6a11cb9e118a2
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ODQyY2QyNTQ1ZWU1MmRkMTRhZDQ1YmFlMTU3NGE0NGEzZWU1YmZlNWQ2NWEy
10
- ODMwNDQ3MDYzMzhjNTlhYjA2MGVmMTdlYzViZTBhNTg3M2YyYjFhMDRkYmQx
11
- OTViOGUxNjRkOTZiNjA2NTVlZmY2NWM5YWFhODQ3YzVmMzA3MTc=
12
- data.tar.gz: !binary |-
13
- YzI3OGQ1NmYxNTM1NjdkMzQ1NGU0ZTMzZGZmZDUyYmM5YjFjODczNjM2OGQ1
14
- YmI4MTk3NmY5ZDY5OGFkOTU3MmI2ZTIyNWVlMjIzNGYzOWM2ZmQ5NjJlZWUw
15
- MWYwY2QyOTllN2QwNDYzMTI3MzhkODA5NGU5YzJkZTliNGMxM2M=
6
+ metadata.gz: 650a967118b4953db191fa9fd197c301e606c59452a378502a3e130f5e343b68a1c0d802212e998c26805486fc0245d1c84cab6cb370b42817f97d227d7db754
7
+ data.tar.gz: cbbeff6d186f8f34892ace98613fa30585ff7d1769e65146f7ef2303339670d23c91e1c757e36335db026850a97673c42f5ed34391dcd54be79e2f2411f5a246
data/.rubocop.yml CHANGED
@@ -1,8 +1,21 @@
1
- Style/AlignParameters:
1
+ ---
2
+ AllCops:
3
+ TargetRubyVersion: 2.3
4
+
5
+ Layout/EndAlignment:
6
+ EnforcedStyleAlignWith: variable
7
+
8
+ Layout/AlignParameters:
2
9
  EnforcedStyle: with_fixed_indentation
3
10
 
4
- Style/Documentation:
5
- Enabled: false
11
+ Layout/IndentArray:
12
+ EnforcedStyle: consistent
6
13
 
7
- Style/MultilineMethodCallIndentation:
14
+ Layout/IndentHash:
15
+ EnforcedStyle: consistent
16
+
17
+ Layout/MultilineMethodCallIndentation:
8
18
  EnforcedStyle: indented
19
+
20
+ Lint/MissingCopEnableDirective:
21
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,17 +1,37 @@
1
+ ---
1
2
  language: ruby
2
3
  rvm:
3
- - 2.0.0
4
- - 2.2.2
5
- - 2.3.1
6
- deploy:
7
- provider: rubygems
8
- api_key:
9
- secure: f1rTqFzMHA1DueBSv7YzFOHy6JxUuSwflvSL6TXG5v5bWs0c6KWi1LhY43pYnpoY3ZyDtFAGgKyvQvvFCvrTB0jQx2lFo2fbXD7LoT1ThX3GLYPvGO79ycUzmXlhNFOGPZo1V3iGb5xAo8ZOVSKNesFWivy81b9SEsL4alv1QUfd2iDs4GzGJMwMIQy758PY21vQhGFfKDXld4ei9cK3hCS4999MluWtjt624FTs9oKoMfzZHfBpMa4ml6oogM1CR3tY8OzjXK0T7nLTr7ykcIiQeJGEP5q8t/IPaDs2v5yPWHv6cm8v9gCewFnzgv0Kqp0CNidzO2OlS3JmOk8mwdKad7dwpm5TKeJp3d9od35vN7H5uYZdozjfiMI7jXsQa+cfsFWWMTf5uaD0hnJFu93AWC+8xxid+/cihcbY8GA2QjjslUNGKZ0/XsWAcE3MBVyBQLecjDWidyyNbgq/LB0lS8F+U9TKTkrNLqID/HsrGnDlA15NY2Kmz74wYs5tEpm5cJ6PLjaJ+vQ8RlgI6Vk+slExheF1bXoQZrGzdXh6G3ZdPxCKynQ7KUkpRfbpmK6NdAaIf2+B77BnpKRYmLcIkfARv2bugBx571IaN8duAz0JIJIWlubL96eJv7RzzRPrsr378OTjEpO8A+w3LyOprhHJ0MYkmeItMKQKl+k=
10
- gem: strudel
11
- on:
12
- tags: true
13
- repo: justinhoward/strudel
14
- addons:
15
- code_climate:
16
- repo_token:
17
- secure: "fSiRB01llLIkzTLFuRHKDwTHJYelGo7+T4q1WZq9/qBuulCzIBUS0VdS7YyZIY0WVhrdhDUVIzNmESt3nGguL9By5TasrMi4HkdaL/WQPQnn/nH4vwkyOFex1mYa/lEmUnYW6fdVWvq9aS79P20zUCcK5EBFqmWZ/jTe7ssFV9u88QwR/NOa1gH8uabsBwefFlg8hKWi+G4DKRtNuOF0dGmiE6bG3VAKv/n16WRXIfyzFHDdNdrURJObHTEzEW7+Q7JNDRsuAcaSwGAWQtOC3RZmUKWfvIy33wJE+amIhL0GHhXJ3L2s1W/pSc/eiIMg1zsGJsbeUg2VdE4XFIRY9nRamXYtCl85IYct9P1nSB4mMXC1ezCN4fmYS0CBfsBJqzEw13mRf2G3qk65z5CYPHIdL0qZ2qHvRw2tz+EVShFk9mLd9g57KsbeGcq+7daOcSMVGo4ypEd/fx512kaWdUxzZQlEZ2YqIFFI3na4aC/dZmmSFdlghtSZCtYnxz/6ZzoHvx+9rZrcR3FNNB+A3TDGynRfmIZf1ZBqKBdbrocUZ4dODxaI7/82J+y3pFoS3bmb+8r8NevwPce/QwPTesU7hJ9iBMutGLJ0+A6WB4iBpBAwq0H7awKVkluCw/me8ZAD7Nwf8+SBjWCUXX87KbCG3niF+EtKjljgE3Q3cFk="
4
+ - 2.3
5
+ - 2.4
6
+ - 2.5
7
+ env:
8
+ global:
9
+ - COVERAGE=1
10
+ - secure: 'O3/v5fgksUZyzVDj/I0nLOwFba9UWXjIiqXguE0gMb1t2qofeI/cEJ/2RWnUpvxuF8mbuPwJG2rU3OLK+2q2pwWpMnVbScc0G8l1mVfG6IlLdkuDWWxjtieKvAbRvcfPLaai0u4V/equs1L5izOreNhc2bp0a7+0ZMHx5SgKxg5OjglcoMIIZgSixpkqITZbPmWDFYSj812lLed1MkP6zkpUsNlxOHrAhw6e3uEPTYwCPgqr2Q08ghgxZgvJP2qbD37Ei1s/fXKmsT6nsXo6y1/mb6jnIjoPkPtykRb3sp1xfFRQMER7jJy4e6ZFCz6nIbNX+7LBzE/5xPywViZ34NrzAnNaLka15w4OxVVQM9kp6mYjZ7FwtZVY6vri40DhbrtCmWOjftRsDP42gkQB51VCMYXTYOkPaeTIJeU4kkrihc5LRDCL8ZqssdW26bLw7NJmlCgedzJV1Bzfz7VfbNi2NRp4wRB9C7vtRK4+YvqFmCu+zu8hyEcE3aqwaYBZQaERZkb6TPgifZor0Kb/uS9y31FxbYlquaLukyN298kWktktP5F+y670066OPNgAoI65Clu7PI3tE9ekUBcK1lO4b25PrVWnOz2WKGVpEhTewZ+nU3Or1oKoFTPObAdbynP080CPx1WNP+CDRphyq3yJfSb7lhw98aGKVeRVVho='
11
+
12
+ before_script:
13
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
14
+ - chmod +x ./cc-test-reporter
15
+ - ./cc-test-reporter before-build
16
+
17
+ script:
18
+ - bin/rubocop
19
+ - bin/rspec --format doc
20
+
21
+ after_script:
22
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
23
+
24
+ jobs:
25
+ include:
26
+ - stage: release
27
+ rvm: 2.3
28
+ script: skip
29
+ deploy:
30
+ provider: rubygems
31
+ api_key:
32
+ secure: 'tcEf3gBUUPOVkDFjvKhBX44cYghbFLXA5BEtmBPwqDXbWaoMVSDcsBRCddLLJts2k1tmYyGVSLP7FR8zE7tfJy40iqSqQRTtdB58SxAoMdU02+x0D8uCgMwdX7qLJePoxW4WVryMo8bql7N4ydtXwlV9POJiDKK47R21G7KvIplMGvav0/SYFFfI21BzCc6Pt8X6a0EuJXJNvqFhJAEvyp+7T8M83owIXwEIsarVc3VTTmefjAJ6zAvpLlRKYU63qN1hOqdzDfGhynNAYhIgstpDwmbwSqxkn4vxmn2OQSXwCeajLiB+nDMpevPGgE9KoeKKGWmv/N0qsgLohR9HziCBl1rolhjfYKshgN18iBBOW1iKBr0sb3EeWU2EDcnDGRvCx6vqD6LTj2TkFI0/nQYuIdPK8eWogpH3hpDwQWcC970bFDWrPFnuQ/jy2wS43y+Q8eAY3cbi07qzc5dMtA/YHkl/PpXM/VjPSWz95clcKc9tSgZN6Vy9dEfYhsTbtbY32SSBw+54N9g1dBaLgeA0T5J/HfNRRldLsZmoolNpeQ11ZLD/afL0Va4rR+qgKG3Hx8Yglp34NzZhSZ0wkrw/RPE2cSCBvknwL/thw+9PKqbSiao9GGFadVJt5KajIP501Bn8oBzoHqU9OuGG8i95MNLZSktnemMbYIgBsDc='
33
+ gem: uncsv
34
+ on:
35
+ tags: true
36
+ condition: bin/check-version
37
+ repo: justinhoward/strudel
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in strudel.gemspec
data/README.md CHANGED
@@ -1,13 +1,10 @@
1
1
  # Strudel
2
2
 
3
- [![Build Status](https://travis-ci.org/justinhoward/strudel.svg?branch=master)]
4
- (https://travis-ci.org/justinhoward/strudel)
5
- [![Code Climate](https://codeclimate.com/github/justinhoward/strudel/badges/gpa.svg)]
6
- (https://codeclimate.com/github/justinhoward/strudel)
7
- [![Test Coverage](https://codeclimate.com/github/justinhoward/strudel/badges/coverage.svg)]
8
- (https://codeclimate.com/github/justinhoward/strudel/coverage)
9
- [![Inline docs](http://inch-ci.org/github/justinhoward/strudel.svg?branch=master&style=shields)]
10
- (http://inch-ci.org/github/justinhoward/strudel)
3
+ [![Gem Version](https://badge.fury.io/rb/strudel.svg)](https://badge.fury.io/rb/strudel)
4
+ [![Build Status](https://travis-ci.org/justinhoward/strudel.svg?branch=master)](https://travis-ci.org/justinhoward/strudel)
5
+ [![Code Climate](https://codeclimate.com/github/justinhoward/strudel/badges/gpa.svg)](https://codeclimate.com/github/justinhoward/strudel)
6
+ [![Test Coverage](https://codeclimate.com/github/justinhoward/strudel/badges/coverage.svg)](https://codeclimate.com/github/justinhoward/strudel)
7
+ [![Inline docs](http://inch-ci.org/github/justinhoward/strudel.svg?branch=master)](http://inch-ci.org/github/justinhoward/strudel)
11
8
 
12
9
  Strudel is a dependency injection container for Ruby. It's a way to organize
13
10
  your Ruby application to take advantage of the [dependency inversion
@@ -29,7 +26,7 @@ dependencies in one place.
29
26
 
30
27
  You may have read [this post][dhh] by David Heineimer Hansson. However he
31
28
  didn't address the primary benefit of DI, explicitly defining dependencies.
32
- I also happen to think that patching code at runtime for testing is a egregious
29
+ I also happen to think that patching code at runtime for testing is an egregious
33
30
  anti-pattern. In case you need more convincing, check out this
34
31
  [great post][piotr] by Piotr Solnica.
35
32
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
  require 'rubocop/rake_task'
@@ -8,4 +10,4 @@ RuboCop::RakeTask.new
8
10
  YARD::Rake::YardocTask.new
9
11
 
10
12
  task default: :check
11
- task check: [:rubocop, :spec]
13
+ task check: %i[rubocop spec]
data/bin/check-version ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env sh
2
+
3
+ tag="$(git describe --abbrev=0)"
4
+ tag="${tag#v}"
5
+ gt=$(ruby -r ./lib/strudel/version -e "puts Gem::Version.new(Strudel::VERSION) >= Gem::Version.new('${tag}')")
6
+ test "$gt" = true
data/bin/rake CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  #
3
5
  # This file was generated by Bundler.
4
6
  #
data/bin/rspec CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  #
3
5
  # This file was generated by Bundler.
4
6
  #
data/bin/rubocop CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
+
3
4
  #
4
5
  # This file was generated by Bundler.
5
6
  #
data/bin/yard CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  #
3
5
  # This file was generated by Bundler.
4
6
  #
data/bin/yardoc CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  #
3
5
  # This file was generated by Bundler.
4
6
  #
data/bin/yri CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  #
3
5
  # This file was generated by Bundler.
4
6
  #
data/lib/strudel.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Strudel
2
4
  #
3
5
  # A tiny dependency injection container
@@ -136,6 +138,7 @@ class Strudel
136
138
  # @return [Enumerable, nil]
137
139
  def each
138
140
  return @services.each_key unless block_given?
141
+
139
142
  @services.each_key { |key| yield key }
140
143
  end
141
144
 
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Strudel
4
+ # The current Strudel gem version
5
+ VERSION = '1.0.0'
6
+ end
data/strudel.gemspec CHANGED
@@ -1,10 +1,12 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'strudel/version'
4
6
 
5
7
  Gem::Specification.new do |spec|
6
8
  spec.name = 'strudel'
7
- spec.version = '0.1.3'
9
+ spec.version = Strudel::VERSION
8
10
  spec.authors = ['Justin Howard']
9
11
  spec.email = ['jmhoward0@gmail.com']
10
12
 
@@ -18,9 +20,9 @@ Gem::Specification.new do |spec|
18
20
  spec.require_paths = ['lib']
19
21
 
20
22
  spec.add_development_dependency 'rake', '~> 10.0'
23
+ spec.add_development_dependency 'redcarpet', '~> 3.4'
21
24
  spec.add_development_dependency 'rspec', '~> 3.4'
22
- spec.add_development_dependency 'yard', '~> 0.8'
25
+ spec.add_development_dependency 'rubocop', '~> 0.61'
23
26
  spec.add_development_dependency 'simplecov', '~> 0.11'
24
- spec.add_development_dependency 'rubocop', '~> 0.41'
25
- spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.6'
27
+ spec.add_development_dependency 'yard', '>= 0.9.11'
26
28
  end
metadata CHANGED
@@ -1,99 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strudel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Howard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-29 00:00:00.000000000 Z
11
+ date: 2018-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '10.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '10.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rspec
28
+ name: redcarpet
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.4'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.4'
41
41
  - !ruby/object:Gem::Dependency
42
- name: yard
42
+ name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.8'
47
+ version: '3.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.8'
54
+ version: '3.4'
55
55
  - !ruby/object:Gem::Dependency
56
- name: simplecov
56
+ name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.11'
61
+ version: '0.61'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.11'
68
+ version: '0.61'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rubocop
70
+ name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.41'
75
+ version: '0.11'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.41'
82
+ version: '0.11'
83
83
  - !ruby/object:Gem::Dependency
84
- name: codeclimate-test-reporter
84
+ name: yard
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '0.6'
89
+ version: 0.9.11
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '0.6'
96
+ version: 0.9.11
97
97
  description:
98
98
  email:
99
99
  - jmhoward0@gmail.com
@@ -101,15 +101,16 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - .gitignore
105
- - .rspec
106
- - .rubocop.yml
107
- - .travis.yml
108
- - .yardopts
104
+ - ".gitignore"
105
+ - ".rspec"
106
+ - ".rubocop.yml"
107
+ - ".travis.yml"
108
+ - ".yardopts"
109
109
  - Gemfile
110
110
  - LICENSE.txt
111
111
  - README.md
112
112
  - Rakefile
113
+ - bin/check-version
113
114
  - bin/rake
114
115
  - bin/rspec
115
116
  - bin/rubocop
@@ -117,6 +118,7 @@ files:
117
118
  - bin/yardoc
118
119
  - bin/yri
119
120
  - lib/strudel.rb
121
+ - lib/strudel/version.rb
120
122
  - strudel.gemspec
121
123
  homepage: https://github.com/justinhoward/strudel
122
124
  licenses:
@@ -128,17 +130,17 @@ require_paths:
128
130
  - lib
129
131
  required_ruby_version: !ruby/object:Gem::Requirement
130
132
  requirements:
131
- - - ! '>='
133
+ - - ">="
132
134
  - !ruby/object:Gem::Version
133
135
  version: '0'
134
136
  required_rubygems_version: !ruby/object:Gem::Requirement
135
137
  requirements:
136
- - - ! '>='
138
+ - - ">="
137
139
  - !ruby/object:Gem::Version
138
140
  version: '0'
139
141
  requirements: []
140
142
  rubyforge_project:
141
- rubygems_version: 2.4.5
143
+ rubygems_version: 2.7.7
142
144
  signing_key:
143
145
  specification_version: 4
144
146
  summary: A tiny dependency injection container