compass_rose 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: bc2d34186d25b9b5f7ba22b34c76527d6bb7d429
4
- data.tar.gz: 82c63d1a56c9d7c82199a379aac952902e08dbe3
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MDQ2NDMwZjNiZTNmNmE0OTcwNTRiMDE0OWUwNGIyNTBkY2ExZDVhMA==
5
+ data.tar.gz: !binary |-
6
+ ODY2YzFjZWU2MmY3ZjA1MDNkNGY2OTNkNzFlZDY1ZmVkZWU4ZDdiMw==
5
7
  SHA512:
6
- metadata.gz: 11f6527ad55c1d692771b12956cc40447d0e4b700e0441fe835a48e39bdc4bc265785d1c66f64da7e1fb16ea26a07f1d611304f84ae9f5189a70b409fdb8db61
7
- data.tar.gz: 8f654997966a3c9d55e49ed994fe618121b56d803181b73c535aee739d3c67f0333ad1f5f547c38f0addd85a9bea7a8a6bb65a0a3b9475109fcb83aeb351142f
8
+ metadata.gz: !binary |-
9
+ YTUwZWZmNThmZmJhYzM5Zjk4YzBlOTE2NTdhZTZmZDBiNGE1MzAyYmI0Yzky
10
+ ZWFlYTFhZDJlYzY1YjU0YjY1MzFhMGVmNGUzMDNmOTZiMzA3NmI3Yjk0OGUz
11
+ YWYwOTQ5N2RhZDFkMjY0ODRhZmM0NjA3MzM5MWIwNTRhNzM4YzE=
12
+ data.tar.gz: !binary |-
13
+ ODI2OTA4ZmQ1OWE5N2U3YzYxNTBhMWViZmEyN2VhMzIwZjA1NGI3ZjliY2Jl
14
+ NjMwZTNhMzAxMDM1YTc2NGY2YmViZDg3ODUzYjNhNTRmYmY0MjAwZjNhNjdj
15
+ OTAzNWZhODUxZTdmNDk5YTQ1MjJmZjU4ZjRjZDQ2Mzc3Zjc3MGM=
data/.rebuild.txt ADDED
File without changes
data/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  compass_rose
2
2
  =================
3
+ [![Build Status](https://img.shields.io/travis/theckman/compass_rose/master.svg)](https://travis-ci.org/theckman/compass_rose)
4
+ [![MIT License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://tldrlegal.com/license/mit-license)
5
+ [![RubyGems :: RMuh Gem Version](http://img.shields.io/gem/v/compass_rose.svg)](https://rubygems.org/gems/compass_rose)
6
+ [![Coveralls Coverage](https://img.shields.io/coveralls/theckman/compass_rose/master.svg)](https://coveralls.io/r/theckman/compass_rose)
7
+ [![Code Climate](https://img.shields.io/codeclimate/github/theckman/compass_rose.svg)](https://codeclimate.com/github/theckman/compass_rose)
8
+ [![Gemnasium](https://img.shields.io/gemnasium/theckman/compass_rose.svg)](https://gemnasium.com/theckman/compass_rose)
3
9
 
4
10
  A tiny gem to convert numerical bearings to their string forms.
5
11
 
data/compass_rose.gemspec CHANGED
@@ -23,7 +23,6 @@ Gem::Specification.new do |g|
23
23
  g.add_development_dependency 'rspec', '~>2.14.1'
24
24
  g.add_development_dependency 'rubocop', '~> 0.19.0'
25
25
  g.add_development_dependency 'fuubar', '~> 1.3.2'
26
- g.add_development_dependency 'simplecov', '~> 0.8.2'
27
26
  g.add_development_dependency 'coveralls', '~> 0.7.0'
28
27
  g.add_development_dependency 'awesome_print', '~> 1.2.0'
29
28
  g.add_development_dependency 'bundler', '>= 1.3'
data/lib/compass_rose.rb CHANGED
@@ -30,7 +30,7 @@ module Compass
30
30
  # Get the direction that your bearing is on the Compass Rose
31
31
  #
32
32
  class Rose
33
- VERSION = '0.1.0'
33
+ VERSION = '0.1.1'
34
34
  def self.direction(bearing, num_points)
35
35
  CompassRose::Direction.calculate(bearing, num_points)
36
36
  end
@@ -0,0 +1,37 @@
1
+ # -*- coding: UTF-8 -*-
2
+ require 'spec_helper'
3
+ require 'ap'
4
+
5
+ describe Compass::Rose do
6
+
7
+ describe '::VERSION' do
8
+ subject { Compass::Rose::VERSION }
9
+
10
+ it { should be_an_instance_of String }
11
+
12
+ it 'should match a simple semver regex' do
13
+ m = /^\d+\.\d+\.\d+$/
14
+ expect(m.match(subject)).not_to be_nil
15
+ end
16
+ end
17
+
18
+ describe '.direction' do
19
+ it 'should take no more than two args' do
20
+ expect do
21
+ Compass::Rose.direction(nil, nil, nil)
22
+ end.to raise_error ArgumentError
23
+ end
24
+
25
+ it 'should take no less than two args' do
26
+ expect do
27
+ Compass::Rose.direction(nil)
28
+ end.to raise_error ArgumentError
29
+ end
30
+
31
+ context 'when given valid bearing' do
32
+ subject { Compass::Rose.direction(42, 32) }
33
+
34
+ it { should be_an_instance_of Hash }
35
+ end
36
+ end
37
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,18 +1,7 @@
1
1
  # -*- coding: UTF-8 -*-
2
- # -*- coding: UTF-8 -*-
3
2
  require 'rspec'
4
- require 'simplecov'
5
3
  require 'coveralls'
6
4
 
7
- $LOAD_PATH.unshift '.' unless $LOAD_PATH.include?('.')
8
-
9
- def repo_root
10
- File.expand_path('../../..', __FILE__)
11
- end
12
-
13
- SimpleCov.formatter = Coveralls::SimpleCov::Formatter
14
- SimpleCov.start do
15
- add_filter '/spec/'
16
- end
5
+ Coveralls.wear!
17
6
 
18
7
  require 'compass_rose'
metadata CHANGED
@@ -1,125 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass_rose
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Heckman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-15 00:00:00.000000000 Z
11
+ date: 2014-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: 10.1.0
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: 10.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.14.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.14.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.19.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
54
  version: 0.19.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: fuubar
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.3.2
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.3.2
69
- - !ruby/object:Gem::Dependency
70
- name: simplecov
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 0.8.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.8.2
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: coveralls
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - "~>"
73
+ - - ~>
88
74
  - !ruby/object:Gem::Version
89
75
  version: 0.7.0
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - "~>"
80
+ - - ~>
95
81
  - !ruby/object:Gem::Version
96
82
  version: 0.7.0
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: awesome_print
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
- - - "~>"
87
+ - - ~>
102
88
  - !ruby/object:Gem::Version
103
89
  version: 1.2.0
104
90
  type: :development
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
- - - "~>"
94
+ - - ~>
109
95
  - !ruby/object:Gem::Version
110
96
  version: 1.2.0
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: bundler
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - ">="
101
+ - - ! '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '1.3'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - ">="
108
+ - - ! '>='
123
109
  - !ruby/object:Gem::Version
124
110
  version: '1.3'
125
111
  description: Converts bearings in degrees to human-readable names
@@ -128,9 +114,10 @@ executables: []
128
114
  extensions: []
129
115
  extra_rdoc_files: []
130
116
  files:
131
- - ".gitignore"
132
- - ".rspec"
133
- - ".travis.yml"
117
+ - .gitignore
118
+ - .rebuild.txt
119
+ - .rspec
120
+ - .travis.yml
134
121
  - Gemfile
135
122
  - LICENSE
136
123
  - README.md
@@ -140,6 +127,7 @@ files:
140
127
  - lib/compass_rose/direction.rb
141
128
  - lib/compass_rose/ranges.rb
142
129
  - lib/compass_rose/rose.rb
130
+ - spec/compass_rose/compass_rose_spec.rb
143
131
  - spec/compass_rose/direction_spec.rb
144
132
  - spec/compass_rose/ranges.rb
145
133
  - spec/compass_rose/ranges_spec.rb
@@ -155,12 +143,12 @@ require_paths:
155
143
  - lib
156
144
  required_ruby_version: !ruby/object:Gem::Requirement
157
145
  requirements:
158
- - - ">="
146
+ - - ! '>='
159
147
  - !ruby/object:Gem::Version
160
148
  version: '0'
161
149
  required_rubygems_version: !ruby/object:Gem::Requirement
162
150
  requirements:
163
- - - ">="
151
+ - - ! '>='
164
152
  - !ruby/object:Gem::Version
165
153
  version: '0'
166
154
  requirements: []
@@ -170,6 +158,7 @@ signing_key:
170
158
  specification_version: 4
171
159
  summary: Bearings to human-readable names
172
160
  test_files:
161
+ - spec/compass_rose/compass_rose_spec.rb
173
162
  - spec/compass_rose/direction_spec.rb
174
163
  - spec/compass_rose/ranges.rb
175
164
  - spec/compass_rose/ranges_spec.rb