cartographie 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.travis.yml +6 -0
- data/README.md +13 -1
- data/lib/cartographie/map.rb +1 -3
- data/lib/cartographie/version.rb +1 -1
- data/spec/cartographie/map_spec.rb +2 -1
- metadata +31 -10
- data/.rvmrc +0 -1
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Cartographie
|
2
2
|
|
3
|
-
|
3
|
+
[![Build Status](https://secure.travis-ci.org/mattonrails/cartographie.png?branch=master)](http://travis-ci.org/mattonrails/cartographie)
|
4
|
+
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/mattonrails/cartographie)
|
5
|
+
|
6
|
+
Cartographie is a wrapper for Google's Static Maps API, but it can support your
|
7
|
+
own custom API, too!
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
@@ -24,6 +28,7 @@ Cartographie.map('New York, NY', width: 200, height: 200, zoom: 10)
|
|
24
28
|
|
25
29
|
```ruby
|
26
30
|
Cartographie.configure do |config|
|
31
|
+
config.api_endpoint = 'http://example.com/api/map'
|
27
32
|
config.width = 640
|
28
33
|
config.height = 640
|
29
34
|
config.zoom = 12
|
@@ -37,6 +42,7 @@ end
|
|
37
42
|
If you do not pass options when generating a map, nor configure a map attribute
|
38
43
|
using the configuration block, the following values will be used:
|
39
44
|
|
45
|
+
- api endpoint: 'http://maps.googleapis.com/maps/api/staticmap'
|
40
46
|
- width: 300
|
41
47
|
- height: 300
|
42
48
|
- zoom: 15
|
@@ -50,3 +56,9 @@ using the configuration block, the following values will be used:
|
|
50
56
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
51
57
|
4. Push to the branch (`git push origin my-new-feature`)
|
52
58
|
5. Create new Pull Request
|
59
|
+
|
60
|
+
## Thanks
|
61
|
+
|
62
|
+
- @nurugger07
|
63
|
+
- @mattpolito
|
64
|
+
- @bthesorceror
|
data/lib/cartographie/map.rb
CHANGED
data/lib/cartographie/version.rb
CHANGED
@@ -7,7 +7,7 @@ describe Cartographie::Map do
|
|
7
7
|
|
8
8
|
describe 'with options' do
|
9
9
|
let(:options) do
|
10
|
-
{ width: 75, height: 75, zoom: 10, file_format: 'jpg', sensor: true }
|
10
|
+
{ width: 75, height: 75, zoom: 10, file_format: 'jpg', sensor: true, api_endpoint: 'endpoint' }
|
11
11
|
end
|
12
12
|
subject { described_class.new 'New York, NY', options }
|
13
13
|
|
@@ -18,6 +18,7 @@ describe Cartographie::Map do
|
|
18
18
|
its(:zoom) { should eq(10) }
|
19
19
|
its(:file_format) { should eq('jpg') }
|
20
20
|
its(:sensor) { should be_true }
|
21
|
+
its(:api_endpoint) { should eq('endpoint') }
|
21
22
|
end
|
22
23
|
|
23
24
|
describe '#uri' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cartographie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-04-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: rake
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: rspec
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ~>
|
@@ -43,7 +53,12 @@ dependencies:
|
|
43
53
|
version: '2.11'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.11'
|
47
62
|
description: Beautiful map generation
|
48
63
|
email:
|
49
64
|
- mattonrails@shortmail.com
|
@@ -53,7 +68,7 @@ extra_rdoc_files: []
|
|
53
68
|
files:
|
54
69
|
- .gitignore
|
55
70
|
- .rspec
|
56
|
-
- .
|
71
|
+
- .travis.yml
|
57
72
|
- Gemfile
|
58
73
|
- LICENSE
|
59
74
|
- README.md
|
@@ -79,15 +94,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
79
94
|
- - ! '>='
|
80
95
|
- !ruby/object:Gem::Version
|
81
96
|
version: '0'
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
hash: 3633727194628838157
|
82
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
101
|
none: false
|
84
102
|
requirements:
|
85
103
|
- - ! '>='
|
86
104
|
- !ruby/object:Gem::Version
|
87
105
|
version: '0'
|
106
|
+
segments:
|
107
|
+
- 0
|
108
|
+
hash: 3633727194628838157
|
88
109
|
requirements: []
|
89
110
|
rubyforge_project:
|
90
|
-
rubygems_version: 1.8.
|
111
|
+
rubygems_version: 1.8.23
|
91
112
|
signing_key:
|
92
113
|
specification_version: 3
|
93
114
|
summary: Wrapper for Google's Static Maps API
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use @$(basename `pwd`) --create
|