necromancer 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +4 -1
  4. data/Rakefile +2 -2
  5. data/lib/necromancer.rb +1 -1
  6. data/lib/necromancer/configuration.rb +1 -1
  7. data/lib/necromancer/context.rb +1 -1
  8. data/lib/necromancer/conversion_target.rb +1 -1
  9. data/lib/necromancer/conversions.rb +1 -1
  10. data/lib/necromancer/converter.rb +4 -4
  11. data/lib/necromancer/converters/array.rb +4 -4
  12. data/lib/necromancer/converters/boolean.rb +5 -5
  13. data/lib/necromancer/converters/date_time.rb +4 -4
  14. data/lib/necromancer/converters/numeric.rb +4 -4
  15. data/lib/necromancer/converters/range.rb +2 -2
  16. data/lib/necromancer/null_converter.rb +2 -2
  17. data/lib/necromancer/version.rb +2 -2
  18. data/necromancer.gemspec +8 -5
  19. data/spec/spec_helper.rb +2 -2
  20. data/spec/unit/can_spec.rb +1 -1
  21. data/spec/unit/config_spec.rb +1 -1
  22. data/spec/unit/configuration/new_spec.rb +1 -1
  23. data/spec/unit/conversions/fetch_spec.rb +1 -1
  24. data/spec/unit/conversions/register_spec.rb +1 -1
  25. data/spec/unit/conversions/to_hash_spec.rb +1 -1
  26. data/spec/unit/convert_spec.rb +1 -1
  27. data/spec/unit/converters/array/array_to_boolean_spec.rb +1 -1
  28. data/spec/unit/converters/array/array_to_numeric_spec.rb +1 -1
  29. data/spec/unit/converters/array/array_to_set_spec.rb +1 -1
  30. data/spec/unit/converters/array/object_to_array_spec.rb +1 -1
  31. data/spec/unit/converters/array/string_to_array_spec.rb +1 -1
  32. data/spec/unit/converters/boolean/boolean_to_integer_spec.rb +1 -1
  33. data/spec/unit/converters/boolean/integer_to_boolean_spec.rb +1 -1
  34. data/spec/unit/converters/boolean/string_to_boolean_spec.rb +1 -1
  35. data/spec/unit/converters/date_time/string_to_date_spec.rb +1 -1
  36. data/spec/unit/converters/date_time/string_to_datetime_spec.rb +1 -1
  37. data/spec/unit/converters/date_time/string_to_time_spec.rb +1 -1
  38. data/spec/unit/converters/numeric/string_to_float_spec.rb +1 -1
  39. data/spec/unit/converters/numeric/string_to_integer_spec.rb +1 -1
  40. data/spec/unit/converters/numeric/string_to_numeric_spec.rb +1 -1
  41. data/spec/unit/converters/range/string_to_range_spec.rb +1 -1
  42. data/spec/unit/inspect_spec.rb +1 -1
  43. data/spec/unit/new_spec.rb +1 -1
  44. data/spec/unit/register_spec.rb +1 -1
  45. data/tasks/console.rake +3 -2
  46. data/tasks/coverage.rake +1 -1
  47. data/tasks/spec.rake +1 -1
  48. metadata +9 -16
  49. data/.gitignore +0 -14
  50. data/.rspec +0 -3
  51. data/.travis.yml +0 -27
  52. data/CODE_OF_CONDUCT.md +0 -49
  53. data/Gemfile +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8af7250cb5f7455175e816a1544b6ccbc5f9ea6f
4
- data.tar.gz: 94ad6d982fbec3a81464cf916dd7cb08204bddc7
2
+ SHA256:
3
+ metadata.gz: 54b73371441befba7008b0cc6c8129df5fc20f03d93a782e6ef3e16326a9fe85
4
+ data.tar.gz: a182cfa0bff4c5028b6dda198f3097a72d2b303666a80008a5039bda42cd4ef8
5
5
  SHA512:
6
- metadata.gz: 9f7d99a2ec16d62bd24432d632bd93953065c010e78382024a101bfabc2d11adeadf134ad4586fb88f14aa9173b91721b62849a3f730ab2741923091d93ebfff
7
- data.tar.gz: b306b1185bced349369a93672ae55aa6099fac218770698b4a46f1c24d458919031459627b95e28c95a903f1d0bb323c61574e4a8cbddbd4e7ac10ae9c828533
6
+ metadata.gz: b14e129413456b5da151b801cb64808e53a61b00ca21da82929afa8176bcfb32a3de58c7920fb6839dc45bcc58cd837605caada739d3b1f9ad0ed7595edb11fe
7
+ data.tar.gz: 14d85a2123407d031c1d11828e2b13471b1b8d8c8d44c211ab92662ff9d08f36dcff6373be9d3d0d034ef015d872a166966058de59fd70a8d8124120cd28437c
@@ -1,5 +1,12 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.5.0] - 2019-03-23
4
+
5
+ ### Changed
6
+ * Change to use Ruby >= 2.0.0
7
+ * Change to load files directly without git
8
+ * Change to raise on error in place of fail
9
+
3
10
  ## [v0.4.0] - 2017-02-18
4
11
 
5
12
  ### Added
@@ -37,6 +44,7 @@
37
44
 
38
45
  * Initial implementation and release
39
46
 
47
+ [v0.5.0]: https://github.com/piotrmurach/necromancer/compare/v0.4.0...v0.5.0
40
48
  [v0.4.0]: https://github.com/piotrmurach/necromancer/compare/v0.3.0...v0.4.0
41
49
  [v0.3.0]: https://github.com/piotrmurach/necromancer/compare/v0.2.0...v0.3.0
42
50
  [v0.2.0]: https://github.com/piotrmurach/necromancer/compare/v0.1.0...v0.2.0
data/README.md CHANGED
@@ -1,12 +1,15 @@
1
1
  # Necromancer
2
+
2
3
  [![Gem Version](https://badge.fury.io/rb/necromancer.svg)][gem]
3
4
  [![Build Status](https://secure.travis-ci.org/piotrmurach/necromancer.svg?branch=master)][travis]
5
+ [![Build status](https://ci.appveyor.com/api/projects/status/qj3xn5gbbfi4puet?svg=true)][appveyor]
4
6
  [![Code Climate](https://codeclimate.com/github/piotrmurach/necromancer/badges/gpa.svg)][codeclimate]
5
7
  [![Coverage Status](https://coveralls.io/repos/github/piotrmurach/necromancer/badge.svg?branch=master)][coverage]
6
8
  [![Inline docs](http://inch-ci.org/github/piotrmurach/necromancer.svg?branch=master)][inchpages]
7
9
 
8
10
  [gem]: http://badge.fury.io/rb/necromancer
9
11
  [travis]: http://travis-ci.org/piotrmurach/necromancer
12
+ [appveyor]: https://ci.appveyor.com/project/piotrmurach/necromancer
10
13
  [codeclimate]: https://codeclimate.com/github/piotrmurach/necromancer
11
14
  [coverage]: https://coveralls.io/github/piotrmurach/necromancer
12
15
  [inchpages]: http://inch-ci.org/github/piotrmurach/necromancer
@@ -434,4 +437,4 @@ The gem is available as open source under the terms of the [MIT License](http://
434
437
 
435
438
  ## Copyright
436
439
 
437
- Copyright (c) 2014-2017 Piotr Murach. See LICENSE for further details.
440
+ Copyright (c) 2014 Piotr Murach. See LICENSE for further details.
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
- # coding: utf-8
2
-
3
1
  require 'bundler/gem_tasks'
4
2
 
5
3
  FileList['tasks/**/*.rake'].each(&method(:import))
6
4
 
7
5
  desc 'Run all specs'
8
6
  task ci: %w[ spec ]
7
+
8
+ task default: :spec
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require_relative 'necromancer/context'
4
4
  require_relative 'necromancer/version'
@@ -1,4 +1,4 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Necromancer
4
4
  # A global configuration for converters.
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'forwardable'
4
4
 
@@ -1,4 +1,4 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Necromancer
4
4
  # A class responsible for wrapping conversion target
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require_relative 'configuration'
4
4
  require_relative 'converter'
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require_relative 'configuration'
4
4
 
@@ -26,7 +26,7 @@ module Necromancer
26
26
  #
27
27
  # @api private
28
28
  def call(*)
29
- fail NotImplementedError
29
+ raise NotImplementedError
30
30
  end
31
31
 
32
32
  # Creates anonymous converter
@@ -46,8 +46,8 @@ module Necromancer
46
46
  # the value that cannot be converted
47
47
  #
48
48
  # @api private
49
- def fail_conversion_type(value)
50
- fail ConversionTypeError, "'#{value}' could not be converted " \
49
+ def raise_conversion_type(value)
50
+ raise ConversionTypeError, "'#{value}' could not be converted " \
51
51
  "from `#{source}` into `#{target}` "
52
52
  end
53
53
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'set'
4
4
 
@@ -26,7 +26,7 @@ module Necromancer
26
26
  when /^((\w)(\s*(,|-)\s*)?)+$/
27
27
  value.to_s.split($4)
28
28
  else
29
- strict ? fail_conversion_type(value) : Array(value)
29
+ strict ? raise_conversion_type(value) : Array(value)
30
30
  end
31
31
  end
32
32
  end
@@ -80,7 +80,7 @@ module Necromancer
80
80
  begin
81
81
  Array(value)
82
82
  rescue
83
- strict ? fail_conversion_type(value) : value
83
+ strict ? raise_conversion_type(value) : value
84
84
  end
85
85
  end
86
86
  end
@@ -101,7 +101,7 @@ module Necromancer
101
101
  begin
102
102
  value.to_set
103
103
  rescue
104
- strict ? fail_conversion_type(value) : value
104
+ strict ? raise_conversion_type(value) : value
105
105
  end
106
106
  end
107
107
  end
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require_relative '../converter'
4
4
  require_relative '../null_converter'
@@ -34,7 +34,7 @@ module Necromancer
34
34
  case value.to_s
35
35
  when TRUE_MATCHER then true
36
36
  when FALSE_MATCHER then false
37
- else strict ? fail_conversion_type(value) : value
37
+ else strict ? raise_conversion_type(value) : value
38
38
  end
39
39
  end
40
40
  end
@@ -55,7 +55,7 @@ module Necromancer
55
55
  begin
56
56
  !value.zero?
57
57
  rescue
58
- strict ? fail_conversion_type(value) : value
58
+ strict ? raise_conversion_type(value) : value
59
59
  end
60
60
  end
61
61
  end
@@ -73,10 +73,10 @@ module Necromancer
73
73
  # @api public
74
74
  def call(value, options = {})
75
75
  strict = options.fetch(:strict, config.strict)
76
- if ['TrueClass', 'FalseClass'].include?(value.class.name)
76
+ if %w[TrueClass FalseClass].include?(value.class.name)
77
77
  value ? 1 : 0
78
78
  else
79
- strict ? fail_conversion_type(value) : value
79
+ strict ? raise_conversion_type(value) : value
80
80
  end
81
81
  end
82
82
  end
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'date'
4
4
  require 'time'
@@ -24,7 +24,7 @@ module Necromancer
24
24
  strict = options.fetch(:strict, config.strict)
25
25
  Date.parse(value)
26
26
  rescue
27
- strict ? fail_conversion_type(value) : value
27
+ strict ? raise_conversion_type(value) : value
28
28
  end
29
29
  end
30
30
 
@@ -41,7 +41,7 @@ module Necromancer
41
41
  strict = options.fetch(:strict, config.strict)
42
42
  DateTime.parse(value)
43
43
  rescue
44
- strict ? fail_conversion_type(value) : value
44
+ strict ? raise_conversion_type(value) : value
45
45
  end
46
46
  end
47
47
 
@@ -61,7 +61,7 @@ module Necromancer
61
61
  strict = options.fetch(:strict, config.strict)
62
62
  Time.parse(value)
63
63
  rescue
64
- strict ? fail_conversion_type(value) : value
64
+ strict ? raise_conversion_type(value) : value
65
65
  end
66
66
  end
67
67
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require_relative '../converter'
4
4
  require_relative '../null_converter'
@@ -22,7 +22,7 @@ module Necromancer
22
22
  strict = options.fetch(:strict, config.strict)
23
23
  Integer(value)
24
24
  rescue
25
- strict ? fail_conversion_type(value) : value.to_i
25
+ strict ? raise_conversion_type(value) : value.to_i
26
26
  end
27
27
  end
28
28
 
@@ -51,7 +51,7 @@ module Necromancer
51
51
  strict = options.fetch(:strict, config.strict)
52
52
  Float(value)
53
53
  rescue
54
- strict ? fail_conversion_type(value) : value.to_f
54
+ strict ? raise_conversion_type(value) : value.to_f
55
55
  end
56
56
  end
57
57
 
@@ -74,7 +74,7 @@ module Necromancer
74
74
  when FLOAT_MATCHER
75
75
  StringToFloatConverter.new(:string, :float).call(value, options)
76
76
  else
77
- strict ? fail_conversion_type(value) : value
77
+ strict ? raise_conversion_type(value) : value
78
78
  end
79
79
  end
80
80
  end
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require_relative '../converter'
4
4
  require_relative '../null_converter'
@@ -35,7 +35,7 @@ module Necromancer
35
35
  when LETTER_MATCHER
36
36
  ::Range.new($1.to_s, $3.to_s, $2 == '...')
37
37
  else
38
- strict ? fail_conversion_type(value) : value
38
+ strict ? raise_conversion_type(value) : value
39
39
  end
40
40
  end
41
41
  end
@@ -1,11 +1,11 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require_relative 'converter'
4
4
 
5
5
  module Necromancer
6
6
  # A pass through converter
7
7
  class NullConverter < Converter
8
- def call(value, options = {})
8
+ def call(value, **options)
9
9
  value
10
10
  end
11
11
  end # NullConverter
@@ -1,5 +1,5 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Necromancer
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end # Necromancer
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'necromancer/version'
@@ -7,17 +6,21 @@ Gem::Specification.new do |spec|
7
6
  spec.name = 'necromancer'
8
7
  spec.version = Necromancer::VERSION
9
8
  spec.authors = ['Piotr Murach']
10
- spec.email = ['']
9
+ spec.email = ['me@piotrmurach.com']
11
10
  spec.summary = %q{Conversion from one object type to another with a bit of black magic.}
12
11
  spec.description = %q{Conversion from one object type to another with a bit of black magic.}
13
12
  spec.homepage = 'https://github.com/piotrmurach/necromancer'
14
13
  spec.license = 'MIT'
15
14
 
16
- spec.files = `git ls-files -z`.split("\x0")
15
+ spec.files = Dir['{lib,spec}/**/*.rb']
16
+ spec.files += Dir['tasks/*', 'necromancer.gemspec']
17
+ spec.files += Dir['README.md', 'CHANGELOG.md', 'LICENSE.txt', 'Rakefile']
17
18
  spec.test_files = spec.files.grep(%r{^(spec)/})
18
19
  spec.require_paths = ["lib"]
19
20
 
20
- spec.add_development_dependency "bundler", "~> 1.6"
21
+ spec.required_ruby_version = '>= 2.0.0'
22
+
23
+ spec.add_development_dependency 'bundler', '>= 1.6'
21
24
  spec.add_development_dependency 'rake'
22
- spec.add_development_dependency 'rspec', '~> 3.5.0'
25
+ spec.add_development_dependency 'rspec', '~> 3.0'
23
26
  end
@@ -1,6 +1,6 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- if RUBY_VERSION > '1.9' and (ENV['COVERAGE'] || ENV['TRAVIS'])
3
+ if ENV['COVERAGE'] || ENV['TRAVIS']
4
4
  require 'simplecov'
5
5
  require 'coveralls'
6
6
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer, 'can?' do
4
4
  it "checks if conversion is possible" do
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer, 'config' do
4
4
  it "configures global settings per instance" do
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::Configuration, '.new' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::Conversions, '#fetch' do
4
4
  it "retrieves conversion given source & target" do
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::Conversions, '.register' do
4
4
  it "allows to register converter" do
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::Conversions, '#to_hash' do
4
4
  it 'exports default conversions to hash' do
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer, '.convert' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::ArrayConverters::ArrayToBooleanConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::ArrayConverters::ArrayToNumericConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::ArrayConverters::ArrayToSetConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::ArrayConverters::ObjectToArrayConverter, '.call' do
4
4
  subject(:converter) { described_class.new(:object, :array) }
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::ArrayConverters::StringToArrayConverter, '.call' do
4
4
  subject(:converter) { described_class.new(:string, :array) }
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::BooleanConverters::BooleanToIntegerConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::BooleanConverters::IntegerToBooleanConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::BooleanConverters::StringToBooleanConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::DateTimeConverters::StringToDateConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::DateTimeConverters::StringToDateTimeConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::DateTimeConverters::StringToTimeConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::NumericConverters::StringToFloatConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::NumericConverters::StringToIntegerConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::NumericConverters::StringToNumericConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer::RangeConverters::StringToRangeConverter, '.call' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer, '.inspect' do
4
4
  subject(:converter) { described_class.new }
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer, '#new' do
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Necromancer, '.register' do
4
4
  it "allows ro register converter" do
@@ -1,10 +1,11 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  desc 'Load gem inside irb console'
4
4
  task :console do
5
5
  require 'irb'
6
6
  require 'irb/completion'
7
- require File.join(__FILE__, '../../lib/necromancer')
7
+ require_relative '../lib/necromancer'
8
8
  ARGV.clear
9
9
  IRB.start
10
10
  end
11
+ task :c => :console
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  desc 'Measure code coverage'
4
4
  task :coverage do
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  begin
4
4
  require 'rspec/core/rake_task'
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: necromancer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-18 00:00:00.000000000 Z
11
+ date: 2019-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
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: '1.6'
27
27
  - !ruby/object:Gem::Dependency
@@ -44,27 +44,22 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.5.0
47
+ version: '3.0'
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: 3.5.0
54
+ version: '3.0'
55
55
  description: Conversion from one object type to another with a bit of black magic.
56
56
  email:
57
- - ''
57
+ - me@piotrmurach.com
58
58
  executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - ".gitignore"
63
- - ".rspec"
64
- - ".travis.yml"
65
62
  - CHANGELOG.md
66
- - CODE_OF_CONDUCT.md
67
- - Gemfile
68
63
  - LICENSE.txt
69
64
  - README.md
70
65
  - Rakefile
@@ -123,15 +118,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
118
  requirements:
124
119
  - - ">="
125
120
  - !ruby/object:Gem::Version
126
- version: '0'
121
+ version: 2.0.0
127
122
  required_rubygems_version: !ruby/object:Gem::Requirement
128
123
  requirements:
129
124
  - - ">="
130
125
  - !ruby/object:Gem::Version
131
126
  version: '0'
132
127
  requirements: []
133
- rubyforge_project:
134
- rubygems_version: 2.5.1
128
+ rubygems_version: 3.0.3
135
129
  signing_key:
136
130
  specification_version: 4
137
131
  summary: Conversion from one object type to another with a bit of black magic.
@@ -162,4 +156,3 @@ test_files:
162
156
  - spec/unit/inspect_spec.rb
163
157
  - spec/unit/new_spec.rb
164
158
  - spec/unit/register_spec.rb
165
- has_rdoc:
data/.gitignore DELETED
@@ -1,14 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --require spec_helper
3
- --warnings
@@ -1,27 +0,0 @@
1
- ---
2
- language: ruby
3
- sudo: false
4
- cache: bundler
5
- language: ruby
6
- script: "bundle exec rake ci"
7
- rvm:
8
- - 1.9.3
9
- - 2.0.0
10
- - 2.1.10
11
- - 2.2.6
12
- - 2.3.3
13
- - 2.4.0
14
- - ruby-head
15
- - jruby-9000
16
- - jruby-head
17
- - rbx-3
18
- matrix:
19
- allow_failures:
20
- - rvm: ruby-head
21
- - rvm: jruby-head
22
- - rvm: rbx-3
23
- fast_finish: true
24
- branches:
25
- only: master
26
- notifications:
27
- email: false
@@ -1,49 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, and in the interest of
4
- fostering an open and welcoming community, we pledge to respect all people who
5
- contribute through reporting issues, posting feature requests, updating
6
- documentation, submitting pull requests or patches, and other activities.
7
-
8
- We are committed to making participation in this project a harassment-free
9
- experience for everyone, regardless of level of experience, gender, gender
10
- identity and expression, sexual orientation, disability, personal appearance,
11
- body size, race, ethnicity, age, religion, or nationality.
12
-
13
- Examples of unacceptable behavior by participants include:
14
-
15
- * The use of sexualized language or imagery
16
- * Personal attacks
17
- * Trolling or insulting/derogatory comments
18
- * Public or private harassment
19
- * Publishing other's private information, such as physical or electronic
20
- addresses, without explicit permission
21
- * Other unethical or unprofessional conduct
22
-
23
- Project maintainers have the right and responsibility to remove, edit, or
24
- reject comments, commits, code, wiki edits, issues, and other contributions
25
- that are not aligned to this Code of Conduct, or to ban temporarily or
26
- permanently any contributor for other behaviors that they deem inappropriate,
27
- threatening, offensive, or harmful.
28
-
29
- By adopting this Code of Conduct, project maintainers commit themselves to
30
- fairly and consistently applying these principles to every aspect of managing
31
- this project. Project maintainers who do not follow or enforce the Code of
32
- Conduct may be permanently removed from the project team.
33
-
34
- This code of conduct applies both within project spaces and in public spaces
35
- when an individual is representing the project or its community.
36
-
37
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
- reported by contacting a project maintainer at [email]. All
39
- complaints will be reviewed and investigated and will result in a response that
40
- is deemed necessary and appropriate to the circumstances. Maintainers are
41
- obligated to maintain confidentiality with regard to the reporter of an
42
- incident.
43
-
44
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
- version 1.3.0, available at
46
- [http://contributor-covenant.org/version/1/3/0/][version]
47
-
48
- [homepage]: http://contributor-covenant.org
49
- [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile DELETED
@@ -1,15 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- group :development do
6
- gem 'yard', '~> 0.8.7'
7
- gem 'benchmark-ips', '~> 2.0.0'
8
- end
9
-
10
- group :metrics do
11
- gem 'coveralls', '~> 0.8.2'
12
- gem 'simplecov', '~> 0.10.0'
13
- gem 'yardstick', '~> 0.9.9'
14
- gem 'term-ansicolor', '=1.3.2'
15
- end