post_haste 0.9 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,31 +1,27 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- post_haste (0.9)
4
+ post_haste (0.9.1)
5
5
  json
6
+ nokogiri
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
- activesupport (3.2.11)
11
- i18n (~> 0.6)
11
+ activesupport (3.2.13)
12
+ i18n (= 0.6.1)
12
13
  multi_json (~> 1.0)
13
- bourne (1.1.2)
14
- mocha (= 0.10.5)
15
14
  i18n (0.6.1)
16
- json (1.7.6)
17
- metaclass (0.0.1)
18
- mocha (0.10.5)
19
- metaclass (~> 0.0.1)
20
- multi_json (1.5.0)
15
+ json (1.8.0)
16
+ multi_json (1.7.3)
17
+ nokogiri (1.5.9)
21
18
  rake (0.8.7)
22
- shoulda (3.3.2)
23
- shoulda-context (~> 1.0.1)
24
- shoulda-matchers (~> 1.4.1)
25
- shoulda-context (1.0.2)
26
- shoulda-matchers (1.4.2)
19
+ shoulda (3.5.0)
20
+ shoulda-context (~> 1.0, >= 1.0.1)
21
+ shoulda-matchers (>= 1.4.1, < 3.0)
22
+ shoulda-context (1.1.2)
23
+ shoulda-matchers (2.1.0)
27
24
  activesupport (>= 3.0.0)
28
- bourne (~> 1.1.2)
29
25
 
30
26
  PLATFORMS
31
27
  ruby
@@ -33,5 +29,5 @@ PLATFORMS
33
29
  DEPENDENCIES
34
30
  bundler (>= 1.1.0)
35
31
  post_haste!
36
- rake (= 0.8.7)
32
+ rake
37
33
  shoulda
@@ -36,7 +36,8 @@ module PostHaste
36
36
  # Given a Washington Post story or blog url, can turn that url into a JSON API endpoint
37
37
  # returns the url and a source (cms or wordpress) used in Article creation
38
38
  def self.get_json(url)
39
- if url.include?('/wp/')
39
+ if url.include?('/wp/') or url.include?('/sf/')
40
+ url = url.split('?').first # strip out anything after a ?
40
41
  [url+'?json=1', 'wordpress']
41
42
  elsif url.include?("_story")
42
43
  [url.gsub('_story','_json'), 'cms']
@@ -1,3 +1,3 @@
1
1
  module PostHaste
2
- VERSION = "0.9"
2
+ VERSION = "0.9.1"
3
3
  end
data/post_haste.gemspec CHANGED
@@ -18,8 +18,9 @@ Gem::Specification.new do |gem|
18
18
  gem.required_rubygems_version = ">= 1.3.6"
19
19
  gem.rubyforge_project = "post_haste"
20
20
  gem.add_runtime_dependency "json"
21
+ gem.add_runtime_dependency "nokogiri"
21
22
 
22
- gem.add_development_dependency "rake", "0.8.7"
23
+ gem.add_development_dependency "rake"
23
24
  gem.add_development_dependency "bundler", ">= 1.1.0"
24
25
  gem.add_development_dependency "shoulda"
25
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: post_haste
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: 0.9.1
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-02-07 00:00:00.000000000 Z
12
+ date: 2013-09-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -27,22 +27,38 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: nokogiri
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: rake
32
48
  requirement: !ruby/object:Gem::Requirement
33
49
  none: false
34
50
  requirements:
35
- - - '='
51
+ - - ! '>='
36
52
  - !ruby/object:Gem::Version
37
- version: 0.8.7
53
+ version: '0'
38
54
  type: :development
39
55
  prerelease: false
40
56
  version_requirements: !ruby/object:Gem::Requirement
41
57
  none: false
42
58
  requirements:
43
- - - '='
59
+ - - ! '>='
44
60
  - !ruby/object:Gem::Version
45
- version: 0.8.7
61
+ version: '0'
46
62
  - !ruby/object:Gem::Dependency
47
63
  name: bundler
48
64
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +125,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
125
  version: '0'
110
126
  segments:
111
127
  - 0
112
- hash: -1009636410974554268
128
+ hash: -2475865737394952429
113
129
  required_rubygems_version: !ruby/object:Gem::Requirement
114
130
  none: false
115
131
  requirements:
@@ -118,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
134
  version: 1.3.6
119
135
  requirements: []
120
136
  rubyforge_project: post_haste
121
- rubygems_version: 1.8.24
137
+ rubygems_version: 1.8.25
122
138
  signing_key:
123
139
  specification_version: 3
124
140
  summary: Because it was there.