cartographie 0.0.3 → 0.0.4
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.
- data/.rspec +1 -0
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/cartographie.gemspec +1 -1
- data/lib/cartographie/config.rb +4 -0
- data/lib/cartographie/version.rb +1 -1
- data/spec/cartographie/config_spec.rb +30 -0
- metadata +6 -6
data/.rspec
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Cartographie
|
2
2
|
|
3
3
|
[](http://travis-ci.org/mattonrails/cartographie)
|
4
|
-
[](https://codeclimate.com/github/mattonrails/cartographie)
|
5
5
|
|
6
6
|
Cartographie is a wrapper for Google's Static Maps API, but it can support your
|
7
7
|
own custom API, too!
|
data/cartographie.gemspec
CHANGED
data/lib/cartographie/config.rb
CHANGED
data/lib/cartographie/version.rb
CHANGED
@@ -4,6 +4,7 @@ require 'cartographie/config'
|
|
4
4
|
|
5
5
|
describe Cartographie::Config do
|
6
6
|
subject { Cartographie::Config }
|
7
|
+
after { Cartographie::Config.reset }
|
7
8
|
|
8
9
|
describe "default configs" do
|
9
10
|
its(:api_endpoint) { should eq('http://maps.googleapis.com/maps/api/staticmap') }
|
@@ -25,10 +26,39 @@ describe Cartographie::Config do
|
|
25
26
|
end
|
26
27
|
end
|
27
28
|
|
29
|
+
|
28
30
|
its(:width) { should eq(100) }
|
29
31
|
its(:height) { should eq(100) }
|
30
32
|
its(:zoom) { should eq(10) }
|
31
33
|
its(:file_format) { should eq('jpg') }
|
32
34
|
its(:sensor) { should be_true }
|
33
35
|
end
|
36
|
+
|
37
|
+
describe "resetting to defaults" do
|
38
|
+
before do
|
39
|
+
Cartographie.configure do |config|
|
40
|
+
config.width = 50
|
41
|
+
config.height = 50
|
42
|
+
config.zoom = 5
|
43
|
+
config.file_format = 'gif'
|
44
|
+
config.sensor = true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
it "replaces all custom configuration" do
|
49
|
+
expect(Cartographie::Config.width).to eq(50)
|
50
|
+
expect(Cartographie::Config.height).to eq(50)
|
51
|
+
expect(Cartographie::Config.zoom).to eq(5)
|
52
|
+
expect(Cartographie::Config.file_format).to eq('gif')
|
53
|
+
expect(Cartographie::Config.sensor).to eq(true)
|
54
|
+
|
55
|
+
Cartographie::Config.reset
|
56
|
+
|
57
|
+
expect(Cartographie::Config.width).to eq(300)
|
58
|
+
expect(Cartographie::Config.height).to eq(300)
|
59
|
+
expect(Cartographie::Config.zoom).to eq(15)
|
60
|
+
expect(Cartographie::Config.file_format).to eq('png')
|
61
|
+
expect(Cartographie::Config.sensor).to eq(false)
|
62
|
+
end
|
63
|
+
end
|
34
64
|
end
|
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.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '2.
|
53
|
+
version: '2.13'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '2.
|
61
|
+
version: '2.13'
|
62
62
|
description: Beautiful map generation
|
63
63
|
email:
|
64
64
|
- mattonrails@shortmail.com
|
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
segments:
|
98
98
|
- 0
|
99
|
-
hash:
|
99
|
+
hash: 2231243369816765640
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
none: false
|
102
102
|
requirements:
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
segments:
|
107
107
|
- 0
|
108
|
-
hash:
|
108
|
+
hash: 2231243369816765640
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
111
|
rubygems_version: 1.8.23
|