morse_contactable 1.1.2 → 1.1.3

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
  SHA1:
3
- metadata.gz: 30f6303325d12509613edb58b71acc9c7113a9bd
4
- data.tar.gz: 86f2721f230b70e7cffef543b11fbbd80a7c66c4
3
+ metadata.gz: 6019be7e9533f90b0a7a5994f9e8177a897c8dab
4
+ data.tar.gz: c6d1d963e3956b3dca60e7e8045c15af04bf9dd6
5
5
  SHA512:
6
- metadata.gz: 8331bb88905d092b56a39c68b8a6a37ca4d8af571c3b1368de23ddf49c29517b504c89edf88aad6feffeaf970514c53fcc34727fa35a644597970358ef2d40f5
7
- data.tar.gz: 8d2f354e336517e9da96871c7b02be761eaac0ea95c282e384cce63ff353d6f222f77fa82895759cbd8079a878552174ce82b7fba2b094fe24f44db53f8ba6ea
6
+ metadata.gz: a965b327e7b4648da8c0eb7f6301b2148b0997ac764a049f8804e64f701d129cc2122b0b9d9524ba3aac3b223eef2773d2fa1cf25ad2b13cb68f9d246717aba4
7
+ data.tar.gz: 1133c4a6924be9ef3fbbeac431721c2b644a8bd3aaa3b781d2237d15424b26d7ea20e23e63f196d5d5475295b11a711c57daf44b8e041a78559d95c382f67ddd
data/Guardfile ADDED
@@ -0,0 +1,77 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
+
18
+ # Note: The cmd option is now required due to the increasing number of ways
19
+ # rspec may be run, below are examples of the most common uses.
20
+ # * bundler: 'bundle exec rspec'
21
+ # * bundler binstubs: 'bin/rspec'
22
+ # * spring: 'bin/rspec' (This will use spring if running and you have
23
+ # installed the spring binstubs per the docs)
24
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
25
+ # * 'just' rspec: 'rspec'
26
+
27
+ guard :rspec, cmd: "bundle exec rspec" do
28
+ require "guard/rspec/dsl"
29
+ dsl = Guard::RSpec::Dsl.new(self)
30
+
31
+ # Feel free to open issues for suggestions and improvements
32
+
33
+ # RSpec files
34
+ rspec = dsl.rspec
35
+ watch(rspec.spec_helper) { rspec.spec_dir }
36
+ watch(rspec.spec_support) { rspec.spec_dir }
37
+ watch(rspec.spec_files)
38
+
39
+ # Ruby files
40
+ ruby = dsl.ruby
41
+ dsl.watch_spec_files_for(ruby.lib_files)
42
+
43
+ # Rails files
44
+ rails = dsl.rails(view_extensions: %w(erb haml slim))
45
+ dsl.watch_spec_files_for(rails.app_files)
46
+ dsl.watch_spec_files_for(rails.views)
47
+
48
+ watch(rails.controllers) do |m|
49
+ [
50
+ rspec.spec.("routing/#{m[1]}_routing"),
51
+ rspec.spec.("controllers/#{m[1]}_controller"),
52
+ rspec.spec.("acceptance/#{m[1]}")
53
+ ]
54
+ end
55
+
56
+ # Rails config changes
57
+ watch(rails.spec_helper) { rspec.spec_dir }
58
+ watch(rails.routes) { "#{rspec.spec_dir}/routing" }
59
+ watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
60
+
61
+ # Capybara features specs
62
+ watch(rails.view_dirs) { |m| rspec.spec.("features/#{m[1]}") }
63
+ watch(rails.layouts) { |m| rspec.spec.("features/#{m[1]}") }
64
+
65
+ # Turnip features and steps
66
+ watch(%r{^spec/acceptance/(.+)\.feature$})
67
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
68
+ Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
69
+ end
70
+ end
71
+
72
+ guard :rubocop do
73
+ watch(%r{.+\.rb$})
74
+ watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
75
+ end
76
+
77
+ guard 'sass', :input => 'sass', :output => 'css'
data/lib/addressable.rb CHANGED
@@ -29,6 +29,10 @@ module Addressable
29
29
  Array.new.tap { |a| REQUIRED_DATABASE_FIELDS.select { |key| a<<self.send(key) } }
30
30
  end
31
31
 
32
+ def address_hash
33
+ REQUIRED_DATABASE_FIELDS.each_with_object({}) { |f, o| o.merge!(f => self.send(f)) }
34
+ end
35
+
32
36
  def address_pretty
33
37
  stringify_array address_array
34
38
  end
@@ -1,3 +1,3 @@
1
1
  module MorseContactable
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
@@ -19,10 +19,12 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_dependency "morse_fields_validator","~>1.0"
21
21
 
22
+ spec.add_development_dependency "byebug"
22
23
  spec.add_development_dependency "bundler", "~> 1.8"
23
24
  spec.add_development_dependency "coveralls", "~> 0.8"
24
25
  spec.add_development_dependency "guard-rspec", "~> 4.5"
25
26
  spec.add_development_dependency "rb-fsevent", "~> 0.9"
27
+ spec.add_development_dependency "pry-byebug"
26
28
  spec.add_development_dependency "shoulda-matchers", "~> 2.8"
27
29
  spec.add_development_dependency "rake", "~> 10.0"
28
30
  spec.add_development_dependency "rspec", "~> 3.2"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morse_contactable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - fredmcgroarty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-26 00:00:00.000000000 Z
11
+ date: 2016-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: morse_fields_validator
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +94,20 @@ dependencies:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0.9'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry-byebug
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: shoulda-matchers
85
113
  requirement: !ruby/object:Gem::Requirement
@@ -134,6 +162,7 @@ files:
134
162
  - ".rspec"
135
163
  - ".travis.yml"
136
164
  - Gemfile
165
+ - Guardfile
137
166
  - LICENSE.txt
138
167
  - README.md
139
168
  - Rakefile