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 CHANGED
@@ -2,6 +2,9 @@
2
2
  *.rbc
3
3
  .bundle
4
4
  .config
5
+ .rbenv-gemsets
6
+ .rbenv-version
7
+ .rvmrc
5
8
  .yardoc
6
9
  Gemfile.lock
7
10
  InstalledFiles
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - jruby-19mode
6
+ - rbx-19mode
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Cartographie
2
2
 
3
- Cartographie is a wrapper for Google's Static Maps API
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
@@ -76,10 +76,8 @@ module Cartographie
76
76
  "#{width}x#{height}"
77
77
  end
78
78
 
79
- private
80
-
81
79
  def api_endpoint
82
- Config.api_endpoint
80
+ options[:api_endpoint] || Config.api_endpoint
83
81
  end
84
82
  end
85
83
  end
@@ -1,3 +1,3 @@
1
1
  module Cartographie
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -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.2
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: 2012-07-13 00:00:00.000000000 Z
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: &70210921610020 !ruby/object:Gem::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: *70210921610020
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: &70210921609580 !ruby/object:Gem::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: *70210921609580
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: &70210921609000 !ruby/object:Gem::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: *70210921609000
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
- - .rvmrc
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.16
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