spassky 0.1.3 → 0.1.31

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spassky (0.1.2)
4
+ spassky (0.1.3)
5
5
  json
6
6
  rainbow
7
7
  rest-client
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
3
  task :default do
4
- sh "rspec spec --color"
4
+ sh "rspec spec --color"
5
+ sh "cucumber"
5
6
  end
@@ -1,10 +1,12 @@
1
1
  require "restclient"
2
2
  require "wurfl-lite"
3
3
  require "singleton"
4
+ require "fileutils"
4
5
 
5
6
  module Spassky::Server
6
7
  LATEST = 'http://downloads.sourceforge.net/project/wurfl/WURFL/latest/wurfl-latest.xml.gz'
7
- WURFL_FILE = File.join(File.dirname(__FILE__), "..", "..", "..", "wurfl/wurfl-latest.xml.gz")
8
+ WURFL_DIRECTORY = File.join(File.dirname(__FILE__), "..", "..", "..", "wurfl")
9
+ WURFL_FILE = File.join(WURFL_DIRECTORY, "wurfl-latest.xml.gz")
8
10
 
9
11
  class DeviceNotFoundError < StandardError
10
12
  end
@@ -16,6 +18,7 @@ module Spassky::Server
16
18
  end
17
19
 
18
20
  def download_wurfl_file
21
+ FileUtils.mkdir_p(WURFL_DIRECTORY)
19
22
  Kernel.puts("Downloading WURFL database")
20
23
  content = RestClient.get(LATEST)
21
24
  File.open(WURFL_FILE, "w") do |file|
@@ -1,3 +1,3 @@
1
1
  module Spassky
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.31'
3
3
  end
@@ -16,6 +16,10 @@ module Spassky::Server
16
16
  end
17
17
 
18
18
  context ".new" do
19
+ it "creates the wurfl directory" do
20
+ FileUtils.should_receive(:mkdir_p).with(Spassky::Server::WURFL_DIRECTORY)
21
+ DeviceDatabase.new
22
+ end
19
23
  it "loads up the wurfl database" do
20
24
  wurfl = mock(:wurfl).as_null_object
21
25
  WURFL.should_receive(:new).with(Spassky::Server::WURFL_FILE).and_return(wurfl)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spassky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.31
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -16,7 +16,7 @@ default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rest-client
19
- requirement: &70202402492340 !ruby/object:Gem::Requirement
19
+ requirement: &70281583441880 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: '0'
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *70202402492340
27
+ version_requirements: *70281583441880
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: json
30
- requirement: &70202402491920 !ruby/object:Gem::Requirement
30
+ requirement: &70281583441460 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: '0'
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *70202402491920
38
+ version_requirements: *70281583441460
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: sinatra
41
- requirement: &70202402491500 !ruby/object:Gem::Requirement
41
+ requirement: &70281583441040 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: '0'
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *70202402491500
49
+ version_requirements: *70281583441040
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: rainbow
52
- requirement: &70202402491080 !ruby/object:Gem::Requirement
52
+ requirement: &70281583440620 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ! '>='
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: '0'
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *70202402491080
60
+ version_requirements: *70281583440620
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: wurfl-lite
63
- requirement: &70202402490660 !ruby/object:Gem::Requirement
63
+ requirement: &70281583440200 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ! '>='
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: '0'
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *70202402490660
71
+ version_requirements: *70281583440200
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: rake
74
- requirement: &70202402490240 !ruby/object:Gem::Requirement
74
+ requirement: &70281583439780 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ! '>='
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: '0'
80
80
  type: :development
81
81
  prerelease: false
82
- version_requirements: *70202402490240
82
+ version_requirements: *70281583439780
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
- requirement: &70202402489820 !ruby/object:Gem::Requirement
85
+ requirement: &70281583439360 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ! '>='
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
- version_requirements: *70202402489820
93
+ version_requirements: *70281583439360
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: cucumber
96
- requirement: &70202402489400 !ruby/object:Gem::Requirement
96
+ requirement: &70281583438940 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ! '>='
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: '0'
102
102
  type: :development
103
103
  prerelease: false
104
- version_requirements: *70202402489400
104
+ version_requirements: *70281583438940
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: capybara
107
- requirement: &70202402488980 !ruby/object:Gem::Requirement
107
+ requirement: &70281583438520 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ! '>='
@@ -112,10 +112,10 @@ dependencies:
112
112
  version: '0'
113
113
  type: :development
114
114
  prerelease: false
115
- version_requirements: *70202402488980
115
+ version_requirements: *70281583438520
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: aruba
118
- requirement: &70202402488560 !ruby/object:Gem::Requirement
118
+ requirement: &70281583438100 !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
121
  - - ! '>='
@@ -123,10 +123,10 @@ dependencies:
123
123
  version: '0'
124
124
  type: :development
125
125
  prerelease: false
126
- version_requirements: *70202402488560
126
+ version_requirements: *70281583438100
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: fakefs
129
- requirement: &70202402488140 !ruby/object:Gem::Requirement
129
+ requirement: &70281583437680 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - ! '>='
@@ -134,7 +134,7 @@ dependencies:
134
134
  version: '0'
135
135
  type: :development
136
136
  prerelease: false
137
- version_requirements: *70202402488140
137
+ version_requirements: *70281583437680
138
138
  description: ''
139
139
  email:
140
140
  - andrew.vos@gmail.com