first_existing 1.1.0 → 1.2.0

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: ca9cde49386293143d55a7f167a945276ac0252843de52ba8144263563be748a
4
- data.tar.gz: a94cdca3ac6d328616fd6ad4a7b88380c7c398b9a104f407b780a711e68b1826
3
+ metadata.gz: 83f8e64fc658e4134105649fdc42026c4b9e8dfd6d0ebc510daaab180cecd062
4
+ data.tar.gz: 6751682d59b6551db5da8eaefd41ab329ebbf918cd56b6ec2eabe9266df29682
5
5
  SHA512:
6
- metadata.gz: 5ef7d9c1d5b83590d2face74c53a440ffad86bc642ac83830b4e4758df4199be0005b69cfcb9fc2faf5573b92710b8588e5cefa437dea490c5101ab33a0986a3
7
- data.tar.gz: e2c787130c5145c33d4489f4050ffb7e9230de5cf3c47ec79ae095e015bc11aa4986da1b23918e1eb071c808a8f64cb12e6688e8cf8eb77a21605512349c5935
6
+ metadata.gz: bba831b536e1b06107599bebcd111fc2aaedf9cedb0edbb8216d9ee698b1cba0c48cd42fd76a399405481bee2501dc362632936625e10065a39c981148396d0a
7
+ data.tar.gz: 16adbf868e64d75cba9baa55576a6d6d5613cbac2e62e24232568b49b8631a9d020143bd06979b64b74bd7f9b0b15fb9aeb55ec3335ca609e39df50653ad3acd
data/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Datasource local storage ignored files
5
+ /dataSources/
6
+ /dataSources.local.xml
7
+ # Editor-based HTTP Client requests
8
+ /httpRequests/
@@ -0,0 +1,51 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="inheritedJdk" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.2.4, rbenv: 3.0.0) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.4.4, rbenv: 3.0.0) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, rbenv: 3.0.0) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.10.0, rbenv: 3.0.0) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.10.1, rbenv: 3.0.0) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.10.1, rbenv: 3.0.0) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.10.2, rbenv: 3.0.0) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.10.2, rbenv: 3.0.0) [gem]" level="application" />
22
+ </component>
23
+ <component name="RakeTasksCache">
24
+ <option name="myRootTask">
25
+ <RakeTaskImpl id="rake">
26
+ <subtasks>
27
+ <RakeTaskImpl description="Build first_existing-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
28
+ <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
29
+ <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
30
+ <RakeTaskImpl description="Build and install first_existing-0.1.0.gem into system gems" fullCommand="install" id="install" />
31
+ <RakeTaskImpl id="install">
32
+ <subtasks>
33
+ <RakeTaskImpl description="Build and install first_existing-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
34
+ </subtasks>
35
+ </RakeTaskImpl>
36
+ <RakeTaskImpl description="Create tag v0.1.0 and build and push first_existing-0.1.0.gem to TODO: Set to 'http://mygemserver.com'" fullCommand="release[remote]" id="release[remote]" />
37
+ <RakeTaskImpl description="Run RSpec code examples" fullCommand="spec" id="spec" />
38
+ <RakeTaskImpl description="" fullCommand="default" id="default" />
39
+ <RakeTaskImpl description="" fullCommand="release" id="release" />
40
+ <RakeTaskImpl id="release">
41
+ <subtasks>
42
+ <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
43
+ <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
44
+ <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
45
+ </subtasks>
46
+ </RakeTaskImpl>
47
+ </subtasks>
48
+ </RakeTaskImpl>
49
+ </option>
50
+ </component>
51
+ </module>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Rubocop" enabled="false" level="WARNING" enabled_by_default="false" />
5
+ </profile>
6
+ </component>
data/.idea/misc.xml ADDED
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 3.0.0" project-jdk-type="RUBY_SDK" />
4
+ </project>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/first_existing.iml" filepath="$PROJECT_DIR$/.idea/first_existing.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -1,5 +1,6 @@
1
1
  require "first_existing/version"
2
2
  require "first_existing/kernel"
3
+ require "first_existing/hash"
3
4
 
4
5
  module FirstExisting
5
6
  def first_existing *args
@@ -0,0 +1,9 @@
1
+ class Hash
2
+ def default! key, *fallbacks
3
+ return self[key] if key? key
4
+
5
+ fallback = first_existing(*fallbacks)
6
+ self[key] = fallback unless fallback.nil?
7
+ end
8
+ alias_method :defaults!, :default!
9
+ end
@@ -1,3 +1,3 @@
1
1
  module FirstExisting
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: first_existing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Lockard
@@ -19,6 +19,12 @@ extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - ".gitignore"
22
+ - ".idea/.gitignore"
23
+ - ".idea/first_existing.iml"
24
+ - ".idea/inspectionProfiles/Project_Default.xml"
25
+ - ".idea/misc.xml"
26
+ - ".idea/modules.xml"
27
+ - ".idea/vcs.xml"
22
28
  - ".rspec"
23
29
  - ".travis.yml"
24
30
  - Gemfile
@@ -29,6 +35,7 @@ files:
29
35
  - bin/setup
30
36
  - first_existing.gemspec
31
37
  - lib/first_existing.rb
38
+ - lib/first_existing/hash.rb
32
39
  - lib/first_existing/kernel.rb
33
40
  - lib/first_existing/version.rb
34
41
  homepage: