cinnamon_serial 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b4b1f1e130c735d90a575a5526bb4ff4b8d1b8e7
4
- data.tar.gz: b021efb4fd143f8deb4ed52392b2227c0873e643
2
+ SHA256:
3
+ metadata.gz: 85e032792b5bfaa51e52499f47b3c43c8367342330a43e4d3995b0c6eeb3437e
4
+ data.tar.gz: 7795256430a84d39483ceb14ea8d1c9c35eee2d20d67912076762080d3373ca7
5
5
  SHA512:
6
- metadata.gz: 48a8172d0abc8757bd2ffaa53e3aed4b02b9f982edf0ec9d7c6be8a4f2dfde9d83c46ccb900a31d55efb7c9938385b298192bff0dfbbd7a8175e673a26b9569e
7
- data.tar.gz: a6c314e747ad984603bcbe3975e0254f481f12fdd7aed6f5aff5b9c34852027d09471d5029bba6691392a187ed951fbb6468d47fef31d2ddad8c463eaa037744
6
+ metadata.gz: f847c7f35e95f58b59348c337700ed0a05fa231f5586a384e2613583d8ad0b2ba090b64f74a9dadf76b1f60b3cfa582e2a3403f9ce8956604acc8238d829f14b
7
+ data.tar.gz: 001d1ab8ad80bc2eaf7f64bc8702472f8cb0c6f30c2826e1454b131db52319bea44a50b8a9e41e94321a9968b3cd5bc8cef4be7352f410b69c16774a6d483981
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  .DS_Store
2
2
  *.gem
3
+ /tmp
4
+ /coverage
data/.rubocop.yml CHANGED
@@ -5,3 +5,9 @@ Metrics/LineLength:
5
5
 
6
6
  Metrics/MethodLength:
7
7
  Max: 20
8
+
9
+ Metrics/BlockLength:
10
+ ExcludedMethods: ['it', 'describe', 'context', 'let', 'specify']
11
+
12
+ AllCops:
13
+ TargetRubyVersion: 2.3
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.7
1
+ 2.6.0
data/.travis.yml CHANGED
@@ -1,8 +1,20 @@
1
+ env:
2
+ global:
3
+ - CC_TEST_REPORTER_ID=929b1dd2a9ccbfa28740405a6471ca20da6aa8eacbf8cf1b6c4c7e632bbe9acd
1
4
  language: ruby
2
5
  rvm:
3
- - 2.3.1
4
- - 2.3.7
6
+ # Build on the latest stable of all supported Rubies (https://www.ruby-lang.org/en/downloads/):
7
+ - 2.3.8
8
+ - 2.4.5
9
+ - 2.5.3
10
+ - 2.6.0
5
11
  cache: bundler
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
6
16
  script:
7
17
  - bundle exec rubocop
8
18
  - bundle exec rspec
19
+ after_script:
20
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # 2.1.1 (January 30th, 2019)
2
+
3
+ Maintenance Release
4
+
5
+ * Added bin/console script
6
+ * Added CHANGELOG
7
+ * Updated README with publication steps, additional testing steps
8
+ * Bumped minimum Ruby to 2.3.8
9
+ * Added Guard
data/Gemfile.lock CHANGED
@@ -1,24 +1,56 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cinnamon_serial (2.1.0)
4
+ cinnamon_serial (2.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
+ ansi (1.5.0)
9
10
  ast (2.4.0)
10
11
  coderay (1.1.2)
11
12
  diff-lcs (1.3)
12
- jaro_winkler (1.5.1)
13
- method_source (0.9.0)
14
- parallel (1.12.1)
15
- parser (2.5.1.2)
13
+ docile (1.3.1)
14
+ ffi (1.10.0)
15
+ formatador (0.2.5)
16
+ guard (2.15.0)
17
+ formatador (>= 0.2.4)
18
+ listen (>= 2.7, < 4.0)
19
+ lumberjack (>= 1.0.12, < 2.0)
20
+ nenv (~> 0.1)
21
+ notiffany (~> 0.0)
22
+ pry (>= 0.9.12)
23
+ shellany (~> 0.0)
24
+ thor (>= 0.18.1)
25
+ guard-compat (1.2.1)
26
+ guard-rspec (4.7.3)
27
+ guard (~> 2.1)
28
+ guard-compat (~> 1.1)
29
+ rspec (>= 2.99.0, < 4.0)
30
+ hirb (0.7.3)
31
+ jaro_winkler (1.5.2)
32
+ json (2.1.0)
33
+ listen (3.1.5)
34
+ rb-fsevent (~> 0.9, >= 0.9.4)
35
+ rb-inotify (~> 0.9, >= 0.9.7)
36
+ ruby_dep (~> 1.2)
37
+ lumberjack (1.0.13)
38
+ method_source (0.9.2)
39
+ nenv (0.3.0)
40
+ notiffany (0.1.1)
41
+ nenv (~> 0.1)
42
+ shellany (~> 0.0)
43
+ parallel (1.13.0)
44
+ parser (2.6.0.0)
16
45
  ast (~> 2.4.0)
17
46
  powerpack (0.1.2)
18
- pry (0.11.3)
47
+ pry (0.12.2)
19
48
  coderay (~> 1.1.0)
20
49
  method_source (~> 0.9.0)
21
50
  rainbow (3.0.0)
51
+ rb-fsevent (0.10.3)
52
+ rb-inotify (0.10.0)
53
+ ffi (~> 1.0)
22
54
  rspec (3.8.0)
23
55
  rspec-core (~> 3.8.0)
24
56
  rspec-expectations (~> 3.8.0)
@@ -32,25 +64,39 @@ GEM
32
64
  diff-lcs (>= 1.2.0, < 2.0)
33
65
  rspec-support (~> 3.8.0)
34
66
  rspec-support (3.8.0)
35
- rubocop (0.59.2)
67
+ rubocop (0.63.1)
36
68
  jaro_winkler (~> 1.5.1)
37
69
  parallel (~> 1.10)
38
70
  parser (>= 2.5, != 2.5.1.1)
39
71
  powerpack (~> 0.1)
40
72
  rainbow (>= 2.2.2, < 4.0)
41
73
  ruby-progressbar (~> 1.7)
42
- unicode-display_width (~> 1.0, >= 1.0.1)
74
+ unicode-display_width (~> 1.4.0)
43
75
  ruby-progressbar (1.10.0)
44
- unicode-display_width (1.4.0)
76
+ ruby_dep (1.5.0)
77
+ shellany (0.0.1)
78
+ simplecov (0.16.1)
79
+ docile (~> 1.1)
80
+ json (>= 1.8, < 3)
81
+ simplecov-html (~> 0.10.0)
82
+ simplecov-console (0.4.2)
83
+ ansi
84
+ hirb
85
+ simplecov
86
+ simplecov-html (0.10.2)
87
+ thor (0.20.3)
88
+ unicode-display_width (1.4.1)
45
89
 
46
90
  PLATFORMS
47
91
  ruby
48
92
 
49
93
  DEPENDENCIES
50
94
  cinnamon_serial!
51
- pry (~> 0.11)
95
+ guard-rspec (~> 4.7)
52
96
  rspec (~> 3.8)
53
- rubocop (~> 0.59.2)
97
+ rubocop (~> 0.63.1)
98
+ simplecov (~> 0.16.1)
99
+ simplecov-console (~> 0.4.2)
54
100
 
55
101
  BUNDLED WITH
56
- 1.16.3
102
+ 1.17.2
data/Guardfile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ guard :rspec, cmd: 'bundle exec rspec' do
4
+ require 'guard/rspec/dsl'
5
+ dsl = Guard::RSpec::Dsl.new(self)
6
+
7
+ # RSpec files
8
+ rspec = dsl.rspec
9
+ watch(rspec.spec_helper) { rspec.spec_dir }
10
+ watch(rspec.spec_support) { rspec.spec_dir }
11
+ watch(rspec.spec_files)
12
+
13
+ # Ruby files
14
+ ruby = dsl.ruby
15
+ dsl.watch_spec_files_for(ruby.lib_files)
16
+ end
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Cinnamon Serial
2
2
 
3
- [![Build Status](https://travis-ci.org/bluemarblepayroll/cinnamon_serial.svg?branch=master)](https://travis-ci.org/bluemarblepayroll/cinnamon_serial)
3
+ [![Gem Version](https://badge.fury.io/rb/cinnamon_serial.svg)](https://badge.fury.io/rb/cinnamon_serial) [![Build Status](https://travis-ci.org/bluemarblepayroll/cinnamon_serial.svg?branch=master)](https://travis-ci.org/bluemarblepayroll/cinnamon_serial) [![Maintainability](https://api.codeclimate.com/v1/badges/0e4c93d2bde984836e97/maintainability)](https://codeclimate.com/github/bluemarblepayroll/cinnamon_serial/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/0e4c93d2bde984836e97/test_coverage)](https://codeclimate.com/github/bluemarblepayroll/cinnamon_serial/test_coverage) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
4
 
5
5
  A common issue is that we typically want different data going
6
6
  outbound than what we have available server-side. Some example motivations could be:
@@ -204,9 +204,37 @@ Basic steps to take to get this repository compiling:
204
204
  To execute the test suite run:
205
205
 
206
206
  ````
207
- rspec
207
+ bundle exec rspec spec --format documentation
208
208
  ````
209
209
 
210
+ Alternatively, you can have Guard watch for changes:
211
+
212
+ ````
213
+ bundle exec guard
214
+ ````
215
+
216
+ Also, do not forget to run Rubocop:
217
+
218
+ ````
219
+ bundle exec rubocop
220
+ ````
221
+
222
+ ### Publishing
223
+
224
+ Note: ensure you have proper authorization before trying to publish new versions.
225
+
226
+ After code changes have successfully gone through the Pull Request review process then the following steps should be followed for publishing new versions:
227
+
228
+ 1. Merge Pull Request into master
229
+ 2. Update ```lib/cinnamon_serial/version.rb``` using [semantic versioning](https://semver.org/)
230
+ 3. Install dependencies: ```bundle```
231
+ 4. Update ```CHANGELOG.md``` with release notes
232
+ 5. Commit & push master to remote and ensure CI builds master successfully
233
+ 6. Build the project locally: `gem build cinnamon_serial`
234
+ 7. Publish package to RubyGems: `gem push cinnamon_serial-X.gem` where X is the version to push
235
+ 8. Tag master with new version: `git tag <version>`
236
+ 9. Push tags remotely: `git push origin --tags`
237
+
210
238
  ## License
211
239
 
212
240
  This project is MIT Licensed.
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'cinnamon_serial'
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require 'irb'
15
+ IRB.start
@@ -19,9 +19,11 @@ Gem::Specification.new do |s|
19
19
  s.homepage = 'https://github.com/bluemarblepayroll/cinnamon_serial'
20
20
  s.license = 'MIT'
21
21
 
22
- s.required_ruby_version = '>= 2.3.1'
22
+ s.required_ruby_version = '>= 2.3.8'
23
23
 
24
- s.add_development_dependency('pry', '~> 0.11')
24
+ s.add_development_dependency('guard-rspec', '~>4.7')
25
25
  s.add_development_dependency('rspec', '~> 3.8')
26
- s.add_development_dependency('rubocop', '~> 0.59.2')
26
+ s.add_development_dependency('rubocop', '~>0.63.1')
27
+ s.add_development_dependency('simplecov', '~>0.16.1')
28
+ s.add_development_dependency('simplecov-console', '~>0.4.2')
27
29
  end
@@ -24,7 +24,7 @@ module CinnamonSerial
24
24
  end
25
25
 
26
26
  def percent(num)
27
- present?(num) ? format('%.2f %', num) : ''
27
+ present?(num) ? format('%.2f %%', num) : ''
28
28
  end
29
29
 
30
30
  def present?(value)
@@ -8,5 +8,5 @@
8
8
  #
9
9
 
10
10
  module CinnamonSerial
11
- VERSION = '2.1.0'
11
+ VERSION = '2.1.1'
12
12
  end
@@ -7,9 +7,7 @@
7
7
  # LICENSE file in the root directory of this source tree.
8
8
  #
9
9
 
10
- require 'date'
11
- require 'pry'
12
- require './lib/cinnamon_serial'
10
+ require './spec/spec_helper'
13
11
  require './spec/examples'
14
12
 
15
13
  describe CinnamonSerial::Base do
@@ -7,10 +7,7 @@
7
7
  # LICENSE file in the root directory of this source tree.
8
8
  #
9
9
 
10
- require 'date'
11
- require 'pry'
12
- require './lib/cinnamon_serial'
13
- require './spec/examples'
10
+ require './spec/spec_helper'
14
11
 
15
12
  describe CinnamonSerial::Dsl do
16
13
  let(:employee_list_keys) do
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Copyright (c) 2018-present, Blue Marble Payroll, LLC
5
+ #
6
+ # This source code is licensed under the MIT license found in the
7
+ # LICENSE file in the root directory of this source tree.
8
+ #
9
+
10
+ require 'date'
11
+ require 'pry'
12
+
13
+ require 'simplecov'
14
+ require 'simplecov-console'
15
+ SimpleCov.formatter = SimpleCov::Formatter::Console
16
+ SimpleCov.start
17
+
18
+ require './lib/cinnamon_serial'
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cinnamon_serial
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ruggio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-15 00:00:00.000000000 Z
11
+ date: 2019-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: pry
14
+ name: guard-rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.11'
19
+ version: '4.7'
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
- version: '0.11'
26
+ version: '4.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,18 +44,47 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.59.2
47
+ version: 0.63.1
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.59.2
54
+ version: 0.63.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.16.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.16.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov-console
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.4.2
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.4.2
55
83
  description: " Domain-specific language for serialization specification.\n"
56
84
  email:
57
85
  - mruggio@bluemarblepayroll.com
58
- executables: []
86
+ executables:
87
+ - console
59
88
  extensions: []
60
89
  extra_rdoc_files: []
61
90
  files:
@@ -65,10 +94,13 @@ files:
65
94
  - ".rubocop_todo.yml"
66
95
  - ".ruby-version"
67
96
  - ".travis.yml"
97
+ - CHANGELOG.md
68
98
  - Gemfile
69
99
  - Gemfile.lock
100
+ - Guardfile
70
101
  - LICENSE
71
102
  - README.md
103
+ - bin/console
72
104
  - cinnamon_serial.gemspec
73
105
  - lib/cinnamon_serial.rb
74
106
  - lib/cinnamon_serial/base.rb
@@ -78,9 +110,10 @@ files:
78
110
  - lib/cinnamon_serial/resolver.rb
79
111
  - lib/cinnamon_serial/specification.rb
80
112
  - lib/cinnamon_serial/version.rb
81
- - spec/base_spec.rb
82
- - spec/dsl_spec.rb
113
+ - spec/cinnamon_serial/base_spec.rb
114
+ - spec/cinnamon_serial/dsl_spec.rb
83
115
  - spec/examples.rb
116
+ - spec/spec_helper.rb
84
117
  homepage: https://github.com/bluemarblepayroll/cinnamon_serial
85
118
  licenses:
86
119
  - MIT
@@ -93,19 +126,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
126
  requirements:
94
127
  - - ">="
95
128
  - !ruby/object:Gem::Version
96
- version: 2.3.1
129
+ version: 2.3.8
97
130
  required_rubygems_version: !ruby/object:Gem::Requirement
98
131
  requirements:
99
132
  - - ">="
100
133
  - !ruby/object:Gem::Version
101
134
  version: '0'
102
135
  requirements: []
103
- rubyforge_project:
104
- rubygems_version: 2.5.2.3
136
+ rubygems_version: 3.0.1
105
137
  signing_key:
106
138
  specification_version: 4
107
139
  summary: Domain-specific language for serialization specification.
108
140
  test_files:
109
- - spec/base_spec.rb
110
- - spec/dsl_spec.rb
141
+ - spec/cinnamon_serial/base_spec.rb
142
+ - spec/cinnamon_serial/dsl_spec.rb
111
143
  - spec/examples.rb
144
+ - spec/spec_helper.rb