persistent-dmnd 1.0.0 → 1.0.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
2
  SHA256:
3
- metadata.gz: 54b67123bdfe4c297e51b64be972627bbe928facb6b511ffb6f4d6c503190d35
4
- data.tar.gz: 9ae346225bfe53de7a2954d0024a90c553757737dd197d1a4fa98bd144611fff
3
+ metadata.gz: 29dbca88c51d0e49932b3f38fe2e210d39e00f3b976adb1876aa33e086d02576
4
+ data.tar.gz: cabea99e2afa0b0539b1a18c90569ab76252c9d05cd20fd36c8e9f92bfa1cf9f
5
5
  SHA512:
6
- metadata.gz: 4cfee400e6a85861aa5048b19b56bde067c1644a761750546cbf469ef7098ecef8511e407405ae7008712258ebbb8852ad34ae70f26c8a78bfbe17663f4133f0
7
- data.tar.gz: 4f5ab905f9ec7e810f463187d76f24d08b0000129c17b90746f5a5f0e68405deaf4275b8c5eb2a7d6badafd64e34debb6b95a8e5972eba04f2e683fd2b0375e8
6
+ metadata.gz: 0b11b0d5702ce13aa8ff10fd9181f1211bab465ab02292a2ddb3850d52c407b3d1296c9941d0628dd9e99eb7e2e6533927a8747faf7231bd435c62feed8db227
7
+ data.tar.gz: d33ffce384b3a2b3814d5ea3ce48ed017d48b0664b0c17bb9f7566ef220ec3769187807c8dd6681e9a2262001eb401ec1636dd4539c0b5b87175ef82f61b0a9d
@@ -1 +1 @@
1
- ruby-2.5.0
1
+ ruby-2.5.1
@@ -2,7 +2,7 @@ language: ruby
2
2
  sudo: false
3
3
 
4
4
  rvm:
5
- - jruby-9.1.15.0
5
+ - jruby-9.1.16.0
6
6
  - 2.5
7
7
  - 2.4
8
8
  - jruby-1.7.9
@@ -13,6 +13,7 @@ rvm:
13
13
  - 2.0.0
14
14
  - jruby-9.0.0.0
15
15
  - jruby-1.7.27
16
+ - ruby-2.6.0-preview1
16
17
  - ruby-head
17
18
  - jruby-head
18
19
 
@@ -20,4 +21,4 @@ matrix:
20
21
  allow_failures:
21
22
  - rvm: ruby-head
22
23
  - rvm: jruby-head
23
- - rvm: 2.5
24
+ - rvm: ruby-2.6.0-preview1
@@ -4,7 +4,7 @@
4
4
  :toclevels: 4
5
5
  :toc-title:
6
6
 
7
- image:https://travis-ci.org/ivoanjo/persistent-dmnd.svg?branch=master["Build Status", link="https://travis-ci.org/ivoanjo/persistent-dmnd"] image:https://gemnasium.com/badges/github.com/ivoanjo/persistent-dmnd.svg["Dependency Status", link="https://gemnasium.com/github.com/ivoanjo/persistent-dmnd"]
7
+ // image:https://travis-ci.org/ivoanjo/persistent-dmnd.svg?branch=master["Build Status", link="https://travis-ci.org/ivoanjo/persistent-dmnd"]
8
8
 
9
9
  Are you tired of calling `.freeze` on your data structures (or your colleagues forgetting to do so)? +
10
10
  Do you wish Ruby had a literal for creating immutable arrays?
@@ -97,7 +97,7 @@ It also (_optionally!_) interoperates with the https://github.com/ruby-concurren
97
97
  Underneath the covers, persistent-💎 mostly builds atop the awesome https://github.com/hamstergem/hamster[hamster gem].
98
98
  Big thanks to its equally-awesome authors!
99
99
 
100
- Persistent-💎 is fully supported and tested on Ruby versions 1.9.3 to 2.5, and JRuby 1.7 to to 9.1. If we don't support your Ruby, it's probably a Python binary. Keep calm and 💎 away!
100
+ Persistent-💎 is fully supported and tested on Ruby versions 1.9.3 to 2.6.0-preview1, and JRuby 1.7 to to 9.1. If we don't support your Ruby, it's probably a Python binary. Keep calm and 💎 away!
101
101
 
102
102
  [discrete]
103
103
  == Contents
@@ -468,13 +468,19 @@ To open a console with the gem loaded, run `bundle console`.
468
468
 
469
469
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to https://rubygems.org[rubygems.org].
470
470
 
471
+ == Feedback and success stories
472
+
473
+ Your feedback is welcome!
474
+
475
+ Please leave a comment on https://gitlab.com/ivoanjo/persistent-dmnd/issues/8 and share how persistent-💎 delighted (or disappointed? 😱) you today!
476
+
471
477
  == Contributing
472
478
 
473
- Bug reports and pull requests are welcome on GitHub at https://github.com/ivoanjo/persistent-dmnd.
479
+ Bug reports and pull requests are welcome on GitLab at https://gitlab.com/ivoanjo/persistent-dmnd.
474
480
 
475
481
  This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the http://contributor-covenant.org[Contributor Covenant] code of conduct.
476
482
 
477
- Maintained with 💎❤️ by https://github.com/ivoanjo/[Ivo Anjo].
483
+ Maintained with 💎❤️ by https://ivoanjo.me/[Ivo Anjo].
478
484
 
479
485
  == Thanks
480
486
 
@@ -488,7 +494,7 @@ The gem is available as open source under the terms of the https://opensource.or
488
494
 
489
495
  == Code of Conduct
490
496
 
491
- Everyone interacting in the Persistent-💎 project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the https://github.com/ivoanjo/persistent-dmnd/blob/master/CODE_OF_CONDUCT.adoc[code of conduct].
497
+ Everyone interacting in the Persistent-💎 project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the https://gitlab.com/ivoanjo/persistent-dmnd/blob/master/CODE_OF_CONDUCT.adoc[code of conduct].
492
498
 
493
499
  == Interesting links
494
500
 
@@ -496,4 +502,4 @@ Interested in immutable/persistent data structures? Here are some interesting re
496
502
 
497
503
  * https://github.com/hamstergem/hamster[hamster gem]
498
504
  * https://github.com/immutable-ruby/immutable-ruby[immmutable-ruby gem]
499
- * https://github.com/ivoanjo/persistent-dmnd/issues[Your suggestion here]
505
+ * https://gitlab.com/ivoanjo/persistent-dmnd/issues[Your suggestion here]
@@ -61,6 +61,7 @@ module Persistent💎
61
61
  def a💎
62
62
  Persistent💎::Array
63
63
  end
64
+
64
65
  alias_method :aDmnd, :a💎
65
66
 
66
67
  # Create a new persistent hash
@@ -73,6 +74,7 @@ module Persistent💎
73
74
  def h💎
74
75
  Persistent💎::Hash
75
76
  end
77
+
76
78
  alias_method :hDmnd, :h💎
77
79
 
78
80
  # Create a new persistent set
@@ -85,6 +87,7 @@ module Persistent💎
85
87
  def s💎
86
88
  Persistent💎::Set
87
89
  end
90
+
88
91
  alias_method :sDmnd, :s💎
89
92
 
90
93
  # Pretty syntax to making something persistent
@@ -104,6 +107,7 @@ module Persistent💎
104
107
  def 💎ify
105
108
  Persistent💎::Dmndifier
106
109
  end
110
+
107
111
  alias_method :dmndify, :💎ify
108
112
  end
109
113
 
@@ -62,6 +62,7 @@ module Persistent💎
62
62
  ConcurrentRubySupport::ensure_concurrent_ruby_loaded
63
63
  Concurrent::Array.new(self)
64
64
  end
65
+
65
66
  alias :to_concurrent :to_concurrent_array
66
67
 
67
68
  # Return Concurrent::Tuple with contents of Persistent💎::Array
@@ -85,16 +86,19 @@ module Persistent💎
85
86
  def to_a💎
86
87
  self
87
88
  end
89
+
88
90
  alias_method :to_aDmnd, :to_a💎
89
91
 
90
92
  def to_h💎
91
93
  h💎[self]
92
94
  end
95
+
93
96
  alias_method :to_hDmnd, :to_h💎
94
97
 
95
98
  def to_s💎
96
99
  s💎[*self]
97
100
  end
101
+
98
102
  alias_method :to_sDmnd, :to_s💎
99
103
  end
100
104
  end
@@ -65,7 +65,7 @@ module Persistent💎
65
65
 
66
66
  def raise_no_concurrent_ruby
67
67
  raise(NotImplementedError,
68
- 'concurrent-ruby gem is not available, please install it in order to use #to_concurrent and #to_concurrent_* methods')
68
+ 'concurrent-ruby gem is not available, please install it in order to use #to_concurrent and #to_concurrent_* methods')
69
69
  end
70
70
 
71
71
  # The following methods are only for internal and test usage. Please do not use them :)
@@ -40,7 +40,7 @@ module Persistent💎
40
40
  DEFAULT_OPTIONS = {
41
41
  on_unknown: proc { |arg|
42
42
  raise ArgumentError, "Could not 💎ify an object of class #{arg.class}. Maybe you need to implement :to_💎?"
43
- }
43
+ },
44
44
  }.freeze
45
45
 
46
46
  private_constant :DEFAULT_OPTIONS
@@ -57,6 +57,7 @@ module Persistent💎
57
57
  ConcurrentRubySupport::ensure_concurrent_ruby_loaded
58
58
  Concurrent::Hash[self]
59
59
  end
60
+
60
61
  alias :to_concurrent :to_concurrent_hash
61
62
 
62
63
  # Return Concurrent::Map with contents of Persistent💎::Hash
@@ -105,21 +106,25 @@ module Persistent💎
105
106
  enum_for(:each💎)
106
107
  end
107
108
  end
109
+
108
110
  alias_method :eachDmnd, :each💎
109
111
 
110
112
  def to_a💎
111
113
  a💎[*each💎]
112
114
  end
115
+
113
116
  alias_method :to_aDmnd, :to_a💎
114
117
 
115
118
  def to_h💎
116
119
  self
117
120
  end
121
+
118
122
  alias_method :to_hDmnd, :to_h💎
119
123
 
120
124
  def to_s💎
121
125
  s💎[*each💎]
122
126
  end
127
+
123
128
  alias_method :to_sDmnd, :to_s💎
124
129
  end
125
130
  end
@@ -32,7 +32,6 @@
32
32
  module Persistent💎
33
33
  module JRubyWorkaround
34
34
  if RUBY_PLATFORM == 'java' # Only supposed to do something on JRuby
35
-
36
35
  BROKEN_ENCODING = "\x00"
37
36
  private_constant :BROKEN_ENCODING
38
37
 
@@ -58,7 +57,7 @@ module Persistent💎
58
57
 
59
58
  # Workaround JRuby encoding bug
60
59
  # See https://github.com/jruby/jruby/issues/4878
61
- # and https://github.com/ivoanjo/persistent-dmnd/issues/5
60
+ # and https://gitlab.com/ivoanjo/persistent-dmnd/issues/5
62
61
  #
63
62
  # The trick here is that on JRuby, methods with emojis in the name are defined, but the resulting name is mangled
64
63
  # so instead of for instance #to_💎 the result is #to_?\x00. (Or #💎ify will become #?ify\x00.) This behavior is
@@ -83,8 +82,8 @@ module Persistent💎
83
82
 
84
83
  if JRUBY_VERSION.start_with?('1.7.')
85
84
  unless name_string.match(/\?.+/) ||
86
- ['a?', 'h?', 's?', 'each?'].include?(name_string) ||
87
- ['_?', '_a?', '_h?', '_s?'].any? { |suffix| name_string.end_with?(suffix) }
85
+ ['a?', 'h?', 's?', 'each?'].include?(name_string) ||
86
+ ['_?', '_a?', '_h?', '_s?'].any? { |suffix| name_string.end_with?(suffix) }
88
87
  return
89
88
  end
90
89
  else
@@ -39,6 +39,7 @@ module Persistent💎
39
39
  def to_💎
40
40
  self
41
41
  end
42
+
42
43
  alias_method :to_dmnd, :to_💎
43
44
  end
44
45
  end
@@ -71,16 +71,19 @@ module Persistent💎
71
71
  def to_a💎
72
72
  a💎[*self]
73
73
  end
74
+
74
75
  alias_method :to_aDmnd, :to_a💎
75
76
 
76
77
  def to_h💎
77
78
  h💎[self]
78
79
  end
80
+
79
81
  alias_method :to_hDmnd, :to_h💎
80
82
 
81
83
  def to_s💎
82
84
  self
83
85
  end
86
+
84
87
  alias_method :to_sDmnd, :to_s💎
85
88
 
86
89
  private
@@ -30,5 +30,5 @@
30
30
  # frozen_string_literal: true
31
31
 
32
32
  module Persistent💎
33
- VERSION = '1.0.0'
33
+ VERSION = '1.0.1'
34
34
  end
@@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
41
41
 
42
42
  spec.summary = 'Persistent-💎: Because Immutable Data Is Forever'
43
43
  spec.description = 'A tiny ruby gem that gives you a beautiful short-hand syntax for creating immutable arrays, hashes and sets'
44
- spec.homepage = 'https://github.com/ivoanjo/persistent-dmnd/'
44
+ spec.homepage = 'https://gitlab.com/ivoanjo/persistent-dmnd/'
45
45
  spec.license = 'MIT'
46
46
 
47
47
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -55,6 +55,7 @@ Gem::Specification.new do |spec|
55
55
  spec.add_development_dependency 'rake', '~> 12.2'
56
56
  spec.add_development_dependency 'rspec', '~> 3.7'
57
57
  spec.add_development_dependency 'concurrent-ruby', '~> 1.0'
58
+ spec.add_development_dependency 'rufo', '~> 0.2'
58
59
  spec.add_development_dependency 'pry'
59
60
  spec.add_development_dependency 'pry-byebug' unless RUBY_PLATFORM == 'java' || RUBY_VERSION.start_with?('1.9.')
60
61
  spec.add_development_dependency 'pry-debugger-jruby' if RUBY_PLATFORM == 'java' && !JRUBY_VERSION.start_with?('1.7.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: persistent-dmnd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivo Anjo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-03 00:00:00.000000000 Z
11
+ date: 2018-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rufo
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.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.2'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: pry
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -142,7 +156,7 @@ files:
142
156
  - lib/persistent_dmnd/set.rb
143
157
  - lib/persistent_dmnd/version.rb
144
158
  - persistent-dmnd.gemspec
145
- homepage: https://github.com/ivoanjo/persistent-dmnd/
159
+ homepage: https://gitlab.com/ivoanjo/persistent-dmnd/
146
160
  licenses:
147
161
  - MIT
148
162
  metadata: {}
@@ -162,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
176
  version: '0'
163
177
  requirements: []
164
178
  rubyforge_project:
165
- rubygems_version: 2.7.3
179
+ rubygems_version: 2.7.6
166
180
  signing_key:
167
181
  specification_version: 4
168
182
  summary: "Persistent-\U0001F48E: Because Immutable Data Is Forever"