stratify-garmin 0.1.0
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/.gitignore +3 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +96 -0
- data/LICENSE +20 -0
- data/README.md +21 -0
- data/Rakefile +10 -0
- data/app/assets/images/garmin-icon-16.png +0 -0
- data/app/assets/images/garmin-icon-24.png +0 -0
- data/lib/stratify-garmin/activity.rb +35 -0
- data/lib/stratify-garmin/collector.rb +59 -0
- data/lib/stratify-garmin/engine.rb +9 -0
- data/lib/stratify-garmin/presenter.rb +40 -0
- data/lib/stratify-garmin/rss_item_adapter.rb +83 -0
- data/lib/stratify-garmin/version.rb +5 -0
- data/lib/stratify-garmin.rb +6 -0
- data/spec/mongoid.yml +3 -0
- data/spec/spec_helper.rb +38 -0
- data/spec/stratify-garmin/activity_spec.rb +10 -0
- data/spec/stratify-garmin/integration_spec.rb +30 -0
- data/spec/stratify-garmin/presenter_spec.rb +33 -0
- data/spec/support/vcr_setup.rb +7 -0
- data/stratify-garmin.gemspec +31 -0
- data/vcr_cassettes/garmin.yml +160 -0
- metadata +170 -0
data/.gitignore
ADDED
data/.rvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rvm use ruby-1.9.2-p180@stratify
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
stratify-garmin (0.1.0)
|
|
5
|
+
nokogiri (~> 1.4.4)
|
|
6
|
+
railties (~> 3.1.0.rc1)
|
|
7
|
+
stratify-base (~> 0.1.0)
|
|
8
|
+
thoughtafter-simple-rss (~> 1.2.3)
|
|
9
|
+
|
|
10
|
+
GEM
|
|
11
|
+
remote: http://rubygems.org/
|
|
12
|
+
specs:
|
|
13
|
+
actionpack (3.1.0.rc1)
|
|
14
|
+
activemodel (= 3.1.0.rc1)
|
|
15
|
+
activesupport (= 3.1.0.rc1)
|
|
16
|
+
builder (~> 3.0.0)
|
|
17
|
+
erubis (~> 2.7.0)
|
|
18
|
+
i18n (~> 0.6.0beta1)
|
|
19
|
+
rack (~> 1.3.0.beta2)
|
|
20
|
+
rack-cache (~> 1.0.1)
|
|
21
|
+
rack-mount (~> 0.8.1)
|
|
22
|
+
rack-test (~> 0.6.0)
|
|
23
|
+
sprockets (~> 2.0.0.beta.5)
|
|
24
|
+
tzinfo (~> 0.3.27)
|
|
25
|
+
activemodel (3.1.0.rc1)
|
|
26
|
+
activesupport (= 3.1.0.rc1)
|
|
27
|
+
bcrypt-ruby (~> 2.1.4)
|
|
28
|
+
builder (~> 3.0.0)
|
|
29
|
+
i18n (~> 0.6.0beta1)
|
|
30
|
+
activesupport (3.1.0.rc1)
|
|
31
|
+
multi_json (~> 1.0)
|
|
32
|
+
bcrypt-ruby (2.1.4)
|
|
33
|
+
bson (1.3.1)
|
|
34
|
+
bson_ext (1.3.1)
|
|
35
|
+
builder (3.0.0)
|
|
36
|
+
database_cleaner (0.6.7)
|
|
37
|
+
diff-lcs (1.1.2)
|
|
38
|
+
erubis (2.7.0)
|
|
39
|
+
fakeweb (1.3.0)
|
|
40
|
+
hike (1.1.0)
|
|
41
|
+
i18n (0.6.0)
|
|
42
|
+
mongo (1.3.1)
|
|
43
|
+
bson (>= 1.3.1)
|
|
44
|
+
mongoid (2.0.2)
|
|
45
|
+
activemodel (~> 3.0)
|
|
46
|
+
mongo (~> 1.3)
|
|
47
|
+
tzinfo (~> 0.3.22)
|
|
48
|
+
multi_json (1.0.3)
|
|
49
|
+
nokogiri (1.4.4)
|
|
50
|
+
rack (1.3.0)
|
|
51
|
+
rack-cache (1.0.2)
|
|
52
|
+
rack (>= 0.4)
|
|
53
|
+
rack-mount (0.8.1)
|
|
54
|
+
rack (>= 1.0.0)
|
|
55
|
+
rack-ssl (1.3.2)
|
|
56
|
+
rack
|
|
57
|
+
rack-test (0.6.0)
|
|
58
|
+
rack (>= 1.0)
|
|
59
|
+
railties (3.1.0.rc1)
|
|
60
|
+
actionpack (= 3.1.0.rc1)
|
|
61
|
+
activesupport (= 3.1.0.rc1)
|
|
62
|
+
rack-ssl (~> 1.3.2)
|
|
63
|
+
rake (>= 0.8.7)
|
|
64
|
+
thor (~> 0.14.6)
|
|
65
|
+
rake (0.9.2)
|
|
66
|
+
rspec (2.6.0)
|
|
67
|
+
rspec-core (~> 2.6.0)
|
|
68
|
+
rspec-expectations (~> 2.6.0)
|
|
69
|
+
rspec-mocks (~> 2.6.0)
|
|
70
|
+
rspec-core (2.6.3)
|
|
71
|
+
rspec-expectations (2.6.0)
|
|
72
|
+
diff-lcs (~> 1.1.2)
|
|
73
|
+
rspec-mocks (2.6.0)
|
|
74
|
+
sprockets (2.0.0.beta.10)
|
|
75
|
+
hike (~> 1.0)
|
|
76
|
+
rack (~> 1.0)
|
|
77
|
+
tilt (!= 1.3.0, ~> 1.1)
|
|
78
|
+
stratify-base (0.1.0)
|
|
79
|
+
bson_ext (~> 1.3.1)
|
|
80
|
+
mongoid (~> 2.0.2)
|
|
81
|
+
tilt (~> 1.3.2)
|
|
82
|
+
thor (0.14.6)
|
|
83
|
+
thoughtafter-simple-rss (1.2.3.3)
|
|
84
|
+
tilt (1.3.2)
|
|
85
|
+
tzinfo (0.3.29)
|
|
86
|
+
vcr (1.10.0)
|
|
87
|
+
|
|
88
|
+
PLATFORMS
|
|
89
|
+
ruby
|
|
90
|
+
|
|
91
|
+
DEPENDENCIES
|
|
92
|
+
database_cleaner (~> 0.6.7)
|
|
93
|
+
fakeweb (~> 1.3.0)
|
|
94
|
+
rspec (~> 2.6.0)
|
|
95
|
+
stratify-garmin!
|
|
96
|
+
vcr (~> 1.10.0)
|
data/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2011 Jason Rudolph (http://jasonrudolph.com)
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
'Software'), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
17
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
18
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
19
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
20
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# stratify-garmin
|
|
2
|
+
|
|
3
|
+
## Dependencies
|
|
4
|
+
|
|
5
|
+
Stratify is developed and tested with the following dependencies.
|
|
6
|
+
|
|
7
|
+
* Ruby 1.9.2 (See `.rvmrc` for the specific version.)
|
|
8
|
+
* MongoDB 1.8
|
|
9
|
+
|
|
10
|
+
## Development
|
|
11
|
+
|
|
12
|
+
To get set up for development on stratify-garmin, clone the repo, and ...
|
|
13
|
+
|
|
14
|
+
cd stratify/stratify-garmin
|
|
15
|
+
gem install bundler
|
|
16
|
+
bundle
|
|
17
|
+
rake
|
|
18
|
+
|
|
19
|
+
## License
|
|
20
|
+
|
|
21
|
+
Copyright 2011 Jason Rudolph ([jasonrudolph.com](http://jasonrudolph.com)). Released under the MIT license. See the LICENSE file for further details.
|
data/Rakefile
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
require 'stratify-garmin/presenter'
|
|
2
|
+
|
|
3
|
+
module Stratify
|
|
4
|
+
module Garmin
|
|
5
|
+
class Activity < Stratify::Activity
|
|
6
|
+
field :guid, :type => Integer
|
|
7
|
+
field :title
|
|
8
|
+
field :description
|
|
9
|
+
field :username
|
|
10
|
+
field :activity_type
|
|
11
|
+
field :event_type
|
|
12
|
+
field :distance_in_miles, :type => Float
|
|
13
|
+
field :time_in_seconds, :type => Integer
|
|
14
|
+
field :starting_latitude, :type => BigDecimal
|
|
15
|
+
field :starting_longitude, :type => BigDecimal
|
|
16
|
+
|
|
17
|
+
natural_key :guid
|
|
18
|
+
|
|
19
|
+
validates_presence_of :guid, :title, :username, :activity_type, :event_type, :distance_in_miles, :time_in_seconds
|
|
20
|
+
|
|
21
|
+
template %q[
|
|
22
|
+
<p class="summary"><%= summary %></p>
|
|
23
|
+
<p class="details"><%= details %></p>
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
def permalink
|
|
27
|
+
"http://connect.garmin.com/activity/#{guid}"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def presenter
|
|
31
|
+
Stratify::Garmin::Presenter.new(self)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
require 'open-uri'
|
|
2
|
+
require 'simple-rss'
|
|
3
|
+
require 'stratify-garmin/rss_item_adapter'
|
|
4
|
+
|
|
5
|
+
module Stratify
|
|
6
|
+
module Garmin
|
|
7
|
+
class Collector < Stratify::Collector
|
|
8
|
+
source "Garmin"
|
|
9
|
+
|
|
10
|
+
configuration_fields :rss_url => {:type => :string, :label => "RSS URL"}
|
|
11
|
+
|
|
12
|
+
configuration_instructions %q[
|
|
13
|
+
<p>To collect your activities from Garmin Connect, the Garmin collector needs the RSS feed for your account.</p>
|
|
14
|
+
|
|
15
|
+
<p>To find the URL for your personal RSS feed, go to the <a href="http://connect.garmin.com/dashboard">dashboard</a> for your Garmin Connect account. Look for the RSS icon next to your recent activities. The URL will look something like this:</p>
|
|
16
|
+
|
|
17
|
+
<p><code>http://connect.garmin.com/feed/rss/activities?feedname=Garmin%20Connect%20-%20johndoe&owner=johndoe</code></p>
|
|
18
|
+
|
|
19
|
+
<p>Grab the RSS feed URL and paste it into the field below.</p>
|
|
20
|
+
|
|
21
|
+
<p><em>Note:</em> In order for an activity to appear in your RSS feed, Garmin requires that you give the activity a title and that you make the activity public. Also, after uploading activities to Garmin Connect, it often takes several hours (sometimes even a full day) for items to show up in the RSS feed.</p>
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
def activities
|
|
25
|
+
activities_from_rss.map {|rss_item| activity_from_rss_item(rss_item)}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def initialize_simple_rss_to_import_geo_tags
|
|
31
|
+
SimpleRSS.item_tags << :"georss:point"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def activities_from_rss
|
|
35
|
+
initialize_simple_rss_to_import_geo_tags
|
|
36
|
+
rss = SimpleRSS.parse open(rss_url)
|
|
37
|
+
rss.items
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def activity_from_rss_item(item)
|
|
41
|
+
adapter = Stratify::Garmin::RssItemAdapter.new(item)
|
|
42
|
+
Stratify::Garmin::Activity.new(
|
|
43
|
+
:title => adapter.title,
|
|
44
|
+
:description => adapter.description,
|
|
45
|
+
:username => adapter.username,
|
|
46
|
+
:activity_type => adapter.activity_type,
|
|
47
|
+
:event_type => adapter.event_type,
|
|
48
|
+
:distance_in_miles => adapter.distance_in_miles,
|
|
49
|
+
:time_in_seconds => adapter.time_in_seconds,
|
|
50
|
+
:elevation_gain_in_feet => adapter.elevation_gain_in_feet,
|
|
51
|
+
:starting_latitude => adapter.starting_latitude,
|
|
52
|
+
:starting_longitude => adapter.starting_longitude,
|
|
53
|
+
:guid => adapter.guid,
|
|
54
|
+
:created_at => adapter.created_at
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module Stratify
|
|
2
|
+
module Garmin
|
|
3
|
+
class Presenter
|
|
4
|
+
delegate :title, :activity_type, :description, :to => :@activity
|
|
5
|
+
|
|
6
|
+
def initialize(activity)
|
|
7
|
+
@activity = activity
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def summary
|
|
11
|
+
"#{activity_type}: #{title}"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def details
|
|
15
|
+
join_fields_with_separator distance, time, description
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def distance
|
|
19
|
+
"%0.2f miles" % @activity.distance_in_miles
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def time
|
|
23
|
+
minutes = @activity.time_in_seconds / 60
|
|
24
|
+
seconds = @activity.time_in_seconds % 60
|
|
25
|
+
"#{minutes} minutes, #{seconds} seconds"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def separator
|
|
31
|
+
"\u2022"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def join_fields_with_separator(*fields)
|
|
35
|
+
fields.reject(&:blank?).join(" #{separator} ")
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
require 'nokogiri'
|
|
2
|
+
|
|
3
|
+
module Stratify
|
|
4
|
+
module Garmin
|
|
5
|
+
class RssItemAdapter
|
|
6
|
+
attr_reader :item
|
|
7
|
+
|
|
8
|
+
def initialize(item)
|
|
9
|
+
@item = item
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def activity_type
|
|
13
|
+
description_content_in_table_row(4)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def created_at
|
|
17
|
+
item.pubDate
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def description
|
|
21
|
+
description_as_nokogiri_doc.at_xpath('//table/tr[1]/td[1]').content
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def distance_in_miles
|
|
25
|
+
distance_string = description_content_in_table_row(6)
|
|
26
|
+
distance_string.to_f
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def elevation_gain_in_feet
|
|
30
|
+
elevation_gain_string = description_content_in_table_row(8)
|
|
31
|
+
elevation_gain_string.to_i
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def event_type
|
|
35
|
+
description_content_in_table_row(5)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def guid
|
|
39
|
+
guid_url = item.guid
|
|
40
|
+
guid_url.slice(/\d*$/) # parse the id out of the url ".../activity/12345678"
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def starting_latitude
|
|
44
|
+
starting_location[:latitude]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def starting_longitude
|
|
48
|
+
starting_location[:longitude]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def time_in_seconds
|
|
52
|
+
time_string = description_content_in_table_row(7)
|
|
53
|
+
time_components = time_string.split(':').map(&:to_i)
|
|
54
|
+
hours, minutes, seconds = time_components[0], time_components[1], time_components[2]
|
|
55
|
+
(hours * 3600) + (minutes * 60) + seconds
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def title
|
|
59
|
+
item.title
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def username
|
|
63
|
+
description_content_in_table_row(2)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
private
|
|
67
|
+
|
|
68
|
+
def description_as_nokogiri_doc
|
|
69
|
+
@description_doc ||= Nokogiri::HTML(item.description)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def description_content_in_table_row(row_index)
|
|
73
|
+
description_as_nokogiri_doc.at_xpath("//table/tr[#{row_index}]/td[2]").content
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def starting_location
|
|
77
|
+
lat_long_pair_as_strings = item.georss_point.split
|
|
78
|
+
lat_long_pair_as_floats = lat_long_pair_as_strings.map(&:to_f)
|
|
79
|
+
{:latitude => lat_long_pair_as_floats.first, :longitude => lat_long_pair_as_floats.last}
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
data/spec/mongoid.yml
ADDED
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
3
|
+
require 'rspec'
|
|
4
|
+
require 'stratify-garmin'
|
|
5
|
+
|
|
6
|
+
# Requires supporting files with custom matchers and macros, etc,
|
|
7
|
+
# in ./support/ and its subdirectories.
|
|
8
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
|
9
|
+
|
|
10
|
+
require 'database_cleaner'
|
|
11
|
+
|
|
12
|
+
RSpec.configure do |config|
|
|
13
|
+
config.color_enabled = true
|
|
14
|
+
config.formatter = :progress
|
|
15
|
+
|
|
16
|
+
# Configure RSpec to run focused specs, and also respect the alias 'fit' for focused specs
|
|
17
|
+
config.filter_run :focused => true
|
|
18
|
+
config.run_all_when_everything_filtered = true
|
|
19
|
+
config.alias_example_to :fit, :focused => true
|
|
20
|
+
|
|
21
|
+
config.extend VCR::RSpec::Macros
|
|
22
|
+
|
|
23
|
+
# Configure RSpec to truncate the database before any spec tagged with ":database => true"
|
|
24
|
+
DatabaseCleaner.strategy = :truncation
|
|
25
|
+
DatabaseCleaner.orm = "mongoid"
|
|
26
|
+
config.before(:each, :database => true) do
|
|
27
|
+
DatabaseCleaner.clean
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
config.before(:suite) do
|
|
31
|
+
initialize_mongoid_configuration
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize_mongoid_configuration
|
|
36
|
+
mongoid_config = YAML::load_file(File.join(File.dirname(__FILE__), "mongoid.yml"))
|
|
37
|
+
Mongoid.from_hash(mongoid_config)
|
|
38
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Stratify::Garmin::Activity do
|
|
4
|
+
describe "#permalink" do
|
|
5
|
+
it "returns the URL for this activity on Garmin Connect" do
|
|
6
|
+
activity = Stratify::Garmin::Activity.new(:guid => 12345678)
|
|
7
|
+
activity.permalink.should == "http://connect.garmin.com/activity/12345678"
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe "stratify-instapaper" do
|
|
4
|
+
use_vcr_cassette "garmin"
|
|
5
|
+
|
|
6
|
+
it "collects and stores data from Garmin Connect", :database => true do
|
|
7
|
+
collector = Stratify::Garmin::Collector.create!(:rss_url => "http://connect.garmin.com/feed/rss/activities?feedname=Garmin%20Connect%20-%20johndoe&owner=johndoe")
|
|
8
|
+
collector.run
|
|
9
|
+
|
|
10
|
+
Stratify::Garmin::Activity.where(
|
|
11
|
+
:title => "7 miles @ easy pace",
|
|
12
|
+
:description => "77 degrees and sunny",
|
|
13
|
+
:username => "johndoe",
|
|
14
|
+
:activity_type => "Running",
|
|
15
|
+
:event_type => "Uncategorized",
|
|
16
|
+
:distance_in_miles => 7.0,
|
|
17
|
+
:time_in_seconds => 3613,
|
|
18
|
+
:elevation_gain_in_feet => 168,
|
|
19
|
+
:starting_latitude => 38.0361161,
|
|
20
|
+
:starting_longitude => -78.503148,
|
|
21
|
+
:guid => 22222222,
|
|
22
|
+
:created_at => Time.parse("Sun, 10 Jul 2011 07:50:53 EDT")
|
|
23
|
+
).should exist
|
|
24
|
+
|
|
25
|
+
Stratify::Garmin::Activity.where(
|
|
26
|
+
:guid => 33333333,
|
|
27
|
+
:created_at => Time.parse("Sat, 09 Jul 2011 08:19:43 EDT")
|
|
28
|
+
).should exist
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Stratify::Garmin::Presenter do
|
|
4
|
+
describe "summary" do
|
|
5
|
+
it "provides the activity's type and title" do
|
|
6
|
+
activity = Stratify::Garmin::Activity.new(:title => "4x800 intervals", :activity_type => "Running")
|
|
7
|
+
presenter = Stratify::Garmin::Presenter.new(activity)
|
|
8
|
+
presenter.summary.should == "Running: 4x800 intervals"
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
describe "details" do
|
|
13
|
+
it "provides the activity's distance, time, and description" do
|
|
14
|
+
activity = Stratify::Garmin::Activity.new(
|
|
15
|
+
:distance_in_miles => 7,
|
|
16
|
+
:time_in_seconds => 3613,
|
|
17
|
+
:description => "77 degrees and sunny"
|
|
18
|
+
)
|
|
19
|
+
presenter = Stratify::Garmin::Presenter.new(activity)
|
|
20
|
+
presenter.details.should == "7.00 miles \u2022 60 minutes, 13 seconds \u2022 77 degrees and sunny"
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it "provides only the activity's distance and time when the description is blank" do
|
|
24
|
+
activity = Stratify::Garmin::Activity.new(
|
|
25
|
+
:distance_in_miles => 7,
|
|
26
|
+
:time_in_seconds => 3613,
|
|
27
|
+
:description => ""
|
|
28
|
+
)
|
|
29
|
+
presenter = Stratify::Garmin::Presenter.new(activity)
|
|
30
|
+
presenter.details.should == "7.00 miles \u2022 60 minutes, 13 seconds"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
3
|
+
require "stratify-garmin/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |s|
|
|
6
|
+
s.name = "stratify-garmin"
|
|
7
|
+
s.version = Stratify::Garmin::VERSION
|
|
8
|
+
s.platform = Gem::Platform::RUBY
|
|
9
|
+
s.authors = ["Jason Rudolph"]
|
|
10
|
+
s.email = ["jason@jasonrudolph.com"]
|
|
11
|
+
s.homepage = "http://github.com/jasonrudolph/stratify/"
|
|
12
|
+
s.summary = "Garmin Connect plugin for Stratify"
|
|
13
|
+
s.description = s.summary
|
|
14
|
+
|
|
15
|
+
s.rubyforge_project = "stratify-garmin"
|
|
16
|
+
|
|
17
|
+
s.files = `git ls-files`.split("\n")
|
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
20
|
+
s.require_paths = ["lib"]
|
|
21
|
+
|
|
22
|
+
s.add_runtime_dependency "nokogiri", "~> 1.4.4"
|
|
23
|
+
s.add_runtime_dependency "railties", "~> 3.1.0.rc1"
|
|
24
|
+
s.add_runtime_dependency "stratify-base", "~> 0.1.0"
|
|
25
|
+
s.add_runtime_dependency "thoughtafter-simple-rss", "~> 1.2.3"
|
|
26
|
+
|
|
27
|
+
s.add_development_dependency "database_cleaner", "~> 0.6.7"
|
|
28
|
+
s.add_development_dependency "fakeweb", "~> 1.3.0"
|
|
29
|
+
s.add_development_dependency "rspec", "~> 2.6.0"
|
|
30
|
+
s.add_development_dependency "vcr", "~> 1.10.0"
|
|
31
|
+
end
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
|
3
|
+
request: !ruby/struct:VCR::Request
|
|
4
|
+
method: :get
|
|
5
|
+
uri: http://connect.garmin.com:80/feed/rss/activities?feedname=Garmin%20Connect%20-%20johndoe&owner=johndoe
|
|
6
|
+
body:
|
|
7
|
+
headers:
|
|
8
|
+
response: !ruby/struct:VCR::Response
|
|
9
|
+
status: !ruby/struct:VCR::ResponseStatus
|
|
10
|
+
code: 200
|
|
11
|
+
message: OK
|
|
12
|
+
headers:
|
|
13
|
+
server:
|
|
14
|
+
- Apache/2.2.14 (Ubuntu)
|
|
15
|
+
pragma:
|
|
16
|
+
- no-cache
|
|
17
|
+
content-type:
|
|
18
|
+
- text/xml;charset=UTF-8
|
|
19
|
+
cache-control:
|
|
20
|
+
- private, no-cache, no-store, must-revalidate
|
|
21
|
+
expires:
|
|
22
|
+
- Fri, 15 Jul 2011 21:04:16 GMT
|
|
23
|
+
date:
|
|
24
|
+
- Fri, 15 Jul 2011 21:04:16 GMT
|
|
25
|
+
content-length:
|
|
26
|
+
- "14243"
|
|
27
|
+
connection:
|
|
28
|
+
- keep-alive
|
|
29
|
+
body: |
|
|
30
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
31
|
+
<rss version="2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:georss="http://www.georss.org/georss">
|
|
32
|
+
<channel>
|
|
33
|
+
<title>Garmin Connect - johndoe</title>
|
|
34
|
+
<description><![CDATA[Garmin Connect RSS Feed]]></description>
|
|
35
|
+
<link>http://connect.garmin.com/</link>
|
|
36
|
+
<copyright>Copyright 1996-2009 Garmin Ltd. or its subsidiaries</copyright>
|
|
37
|
+
<item>
|
|
38
|
+
<title>4x800 intervals</title>
|
|
39
|
+
<category>Running</category>
|
|
40
|
+
<category>running</category>
|
|
41
|
+
<category>Uncategorized</category>
|
|
42
|
+
<category>uncategorized</category>
|
|
43
|
+
<description><![CDATA[<table width="500" border="0" cellpadding="0" cellspacing="5"><tr><td colspan=2 valign="top">Approach: For each interval, aim for 5:35 pace or 185 bpm heart rate (whichever comes first).</td><td rowspan="8" valign="top"><img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/38.0361161,-78.503148/14?mapSize=250,250&pp=38.0361161,-78.503148;1;S&key=Ai6VSxrizWV03n4cSybVIDly6a_jDQB_ianC9MAn4qSEs2gUiQIdmAHT7S2n_tX7" alt="Bing Map" /></td></tr><tr valign="top"><td width="120">Owner: </td><td>johndoe</td></tr><tr valign="top"><td width="120">Location: </td><td>--</td></tr><tr valign="top"><td width="120">Activity Type: </td><td>Running</td></tr><tr valign="top"><td width="120">Event Type: </td><td>Uncategorized</td></tr><tr valign="top"><td width="120">Distance: </td><td>5.76 Mile</td></tr><tr valign="top"><td width="120">Time: </td><td>00:50:43</td></tr><tr valign="top"><td width="120">Elevation Gain: </td><td>472 Feet</td></tr></table>]]></description>
|
|
44
|
+
<link>http://connect.garmin.com/activity/11111111</link>
|
|
45
|
+
<guid>http://connect.garmin.com/activity/11111111</guid>
|
|
46
|
+
<pubDate>Tue, 12 Jul 2011 06:02:04 -0400</pubDate>
|
|
47
|
+
<georss:point>38.0361161 -78.503148</georss:point>
|
|
48
|
+
</item>
|
|
49
|
+
<item>
|
|
50
|
+
<title>7 miles @ easy pace</title>
|
|
51
|
+
<category>Running</category>
|
|
52
|
+
<category>running</category>
|
|
53
|
+
<category>Uncategorized</category>
|
|
54
|
+
<category>uncategorized</category>
|
|
55
|
+
<description><![CDATA[<table width="500" border="0" cellpadding="0" cellspacing="5"><tr><td colspan=2 valign="top">77 degrees and sunny</td><td rowspan="8" valign="top"><img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/38.0361161,-78.503148/14?mapSize=250,250&pp=38.0361161,-78.503148;1;S&key=Ai6VSxrizWV03n4cSybVIDly6a_jDQB_ianC9MAn4qSEs2gUiQIdmAHT7S2n_tX7" alt="Bing Map" /></td></tr><tr valign="top"><td width="120">Owner: </td><td>johndoe</td></tr><tr valign="top"><td width="120">Location: </td><td>--</td></tr><tr valign="top"><td width="120">Activity Type: </td><td>Running</td></tr><tr valign="top"><td width="120">Event Type: </td><td>Uncategorized</td></tr><tr valign="top"><td width="120">Distance: </td><td>7.00 Mile</td></tr><tr valign="top"><td width="120">Time: </td><td>01:00:13</td></tr><tr valign="top"><td width="120">Elevation Gain: </td><td>168 Feet</td></tr></table>]]></description>
|
|
56
|
+
<link>http://connect.garmin.com/activity/22222222</link>
|
|
57
|
+
<guid>http://connect.garmin.com/activity/22222222</guid>
|
|
58
|
+
<pubDate>Sun, 10 Jul 2011 07:50:53 -0400</pubDate>
|
|
59
|
+
<georss:point>38.0361161 -78.503148</georss:point>
|
|
60
|
+
</item>
|
|
61
|
+
<item>
|
|
62
|
+
<title>3 miles @ easy pace</title>
|
|
63
|
+
<category>Running</category>
|
|
64
|
+
<category>running</category>
|
|
65
|
+
<category>Uncategorized</category>
|
|
66
|
+
<category>uncategorized</category>
|
|
67
|
+
<description><![CDATA[<table width="500" border="0" cellpadding="0" cellspacing="5"><tr><td colspan=2 valign="top"></td><td rowspan="8" valign="top"><img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/38.0361161,-78.503148/14?mapSize=250,250&pp=38.0361161,-78.503148;1;S&key=Ai6VSxrizWV03n4cSybVIDly6a_jDQB_ianC9MAn4qSEs2gUiQIdmAHT7S2n_tX7" alt="Bing Map" /></td></tr><tr valign="top"><td width="120">Owner: </td><td>johndoe</td></tr><tr valign="top"><td width="120">Location: </td><td>--</td></tr><tr valign="top"><td width="120">Activity Type: </td><td>Running</td></tr><tr valign="top"><td width="120">Event Type: </td><td>Uncategorized</td></tr><tr valign="top"><td width="120">Distance: </td><td>3.00 Mile</td></tr><tr valign="top"><td width="120">Time: </td><td>00:26:28</td></tr><tr valign="top"><td width="120">Elevation Gain: </td><td>146 Feet</td></tr></table>]]></description>
|
|
68
|
+
<link>http://connect.garmin.com/activity/33333333</link>
|
|
69
|
+
<guid>http://connect.garmin.com/activity/33333333</guid>
|
|
70
|
+
<pubDate>Sat, 09 Jul 2011 08:19:43 -0400</pubDate>
|
|
71
|
+
<georss:point>38.0361161 -78.503148</georss:point>
|
|
72
|
+
</item>
|
|
73
|
+
<item>
|
|
74
|
+
<title>4 miles w/ 2-mile fartlek</title>
|
|
75
|
+
<category>Running</category>
|
|
76
|
+
<category>running</category>
|
|
77
|
+
<category>Uncategorized</category>
|
|
78
|
+
<category>uncategorized</category>
|
|
79
|
+
<description><![CDATA[<table width="500" border="0" cellpadding="0" cellspacing="5"><tr><td colspan=2 valign="top">81 degrees and sunny. Ran in the sun most of the way. Hot!</td><td rowspan="8" valign="top"><img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/38.0361161,-78.503148/14?mapSize=250,250&pp=38.0361161,-78.503148;1;S&key=Ai6VSxrizWV03n4cSybVIDly6a_jDQB_ianC9MAn4qSEs2gUiQIdmAHT7S2n_tX7" alt="Bing Map" /></td></tr><tr valign="top"><td width="120">Owner: </td><td>johndoe</td></tr><tr valign="top"><td width="120">Location: </td><td>--</td></tr><tr valign="top"><td width="120">Activity Type: </td><td>Running</td></tr><tr valign="top"><td width="120">Event Type: </td><td>Uncategorized</td></tr><tr valign="top"><td width="120">Distance: </td><td>4.00 Mile</td></tr><tr valign="top"><td width="120">Time: </td><td>00:34:10</td></tr><tr valign="top"><td width="120">Elevation Gain: </td><td>213 Feet</td></tr></table>]]></description>
|
|
80
|
+
<link>http://connect.garmin.com/activity/44444444</link>
|
|
81
|
+
<guid>http://connect.garmin.com/activity/44444444</guid>
|
|
82
|
+
<pubDate>Fri, 08 Jul 2011 17:51:50 -0400</pubDate>
|
|
83
|
+
<georss:point>38.0361161 -78.503148</georss:point>
|
|
84
|
+
</item>
|
|
85
|
+
<item>
|
|
86
|
+
<title>Strides</title>
|
|
87
|
+
<category>Running</category>
|
|
88
|
+
<category>running</category>
|
|
89
|
+
<category>Uncategorized</category>
|
|
90
|
+
<category>uncategorized</category>
|
|
91
|
+
<description><![CDATA[<table width="500" border="0" cellpadding="0" cellspacing="5"><tr><td colspan=2 valign="top"></td><td rowspan="8" valign="top"><img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/38.0361161,-78.503148/14?mapSize=250,250&pp=38.0361161,-78.503148;1;S&key=Ai6VSxrizWV03n4cSybVIDly6a_jDQB_ianC9MAn4qSEs2gUiQIdmAHT7S2n_tX7" alt="Bing Map" /></td></tr><tr valign="top"><td width="120">Owner: </td><td>johndoe</td></tr><tr valign="top"><td width="120">Location: </td><td>--</td></tr><tr valign="top"><td width="120">Activity Type: </td><td>Running</td></tr><tr valign="top"><td width="120">Event Type: </td><td>Uncategorized</td></tr><tr valign="top"><td width="120">Distance: </td><td>0.27 Mile</td></tr><tr valign="top"><td width="120">Time: </td><td>00:01:57</td></tr><tr valign="top"><td width="120">Elevation Gain: </td><td>0 Feet</td></tr></table>]]></description>
|
|
92
|
+
<link>http://connect.garmin.com/activity/55555555</link>
|
|
93
|
+
<guid>http://connect.garmin.com/activity/55555555</guid>
|
|
94
|
+
<pubDate>Wed, 06 Jul 2011 06:45:11 -0400</pubDate>
|
|
95
|
+
<georss:point>38.0361161 -78.503148</georss:point>
|
|
96
|
+
</item>
|
|
97
|
+
<item>
|
|
98
|
+
<title>4 miles @ easy pace</title>
|
|
99
|
+
<category>Running</category>
|
|
100
|
+
<category>running</category>
|
|
101
|
+
<category>Uncategorized</category>
|
|
102
|
+
<category>uncategorized</category>
|
|
103
|
+
<description><![CDATA[<table width="500" border="0" cellpadding="0" cellspacing="5"><tr><td colspan=2 valign="top"></td><td rowspan="8" valign="top"><img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/38.0361161,-78.503148/14?mapSize=250,250&pp=38.0361161,-78.503148;1;S&key=Ai6VSxrizWV03n4cSybVIDly6a_jDQB_ianC9MAn4qSEs2gUiQIdmAHT7S2n_tX7" alt="Bing Map" /></td></tr><tr valign="top"><td width="120">Owner: </td><td>johndoe</td></tr><tr valign="top"><td width="120">Location: </td><td>--</td></tr><tr valign="top"><td width="120">Activity Type: </td><td>Running</td></tr><tr valign="top"><td width="120">Event Type: </td><td>Uncategorized</td></tr><tr valign="top"><td width="120">Distance: </td><td>4.00 Mile</td></tr><tr valign="top"><td width="120">Time: </td><td>00:34:48</td></tr><tr valign="top"><td width="120">Elevation Gain: </td><td>200 Feet</td></tr></table>]]></description>
|
|
104
|
+
<link>http://connect.garmin.com/activity/66666666</link>
|
|
105
|
+
<guid>http://connect.garmin.com/activity/66666666</guid>
|
|
106
|
+
<pubDate>Wed, 06 Jul 2011 06:05:46 -0400</pubDate>
|
|
107
|
+
<georss:point>38.0361161 -78.503148</georss:point>
|
|
108
|
+
</item>
|
|
109
|
+
<item>
|
|
110
|
+
<title>6 miles @ easy pace</title>
|
|
111
|
+
<category>Running</category>
|
|
112
|
+
<category>running</category>
|
|
113
|
+
<category>Uncategorized</category>
|
|
114
|
+
<category>uncategorized</category>
|
|
115
|
+
<description><![CDATA[<table width="500" border="0" cellpadding="0" cellspacing="5"><tr><td colspan=2 valign="top"></td><td rowspan="8" valign="top"><img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/38.0361161,-78.503148/14?mapSize=250,250&pp=38.0361161,-78.503148;1;S&key=Ai6VSxrizWV03n4cSybVIDly6a_jDQB_ianC9MAn4qSEs2gUiQIdmAHT7S2n_tX7" alt="Bing Map" /></td></tr><tr valign="top"><td width="120">Owner: </td><td>johndoe</td></tr><tr valign="top"><td width="120">Location: </td><td>--</td></tr><tr valign="top"><td width="120">Activity Type: </td><td>Running</td></tr><tr valign="top"><td width="120">Event Type: </td><td>Uncategorized</td></tr><tr valign="top"><td width="120">Distance: </td><td>6.00 Mile</td></tr><tr valign="top"><td width="120">Time: </td><td>00:55:40</td></tr><tr valign="top"><td width="120">Elevation Gain: </td><td>114 Feet</td></tr></table>]]></description>
|
|
116
|
+
<link>http://connect.garmin.com/activity/77777777</link>
|
|
117
|
+
<guid>http://connect.garmin.com/activity/77777777</guid>
|
|
118
|
+
<pubDate>Mon, 04 Jul 2011 07:18:32 -0400</pubDate>
|
|
119
|
+
<georss:point>38.0361161 -78.503148</georss:point>
|
|
120
|
+
</item>
|
|
121
|
+
<item>
|
|
122
|
+
<title>3 miles @ easy pace</title>
|
|
123
|
+
<category>Running</category>
|
|
124
|
+
<category>running</category>
|
|
125
|
+
<category>Uncategorized</category>
|
|
126
|
+
<category>uncategorized</category>
|
|
127
|
+
<description><![CDATA[<table width="500" border="0" cellpadding="0" cellspacing="5"><tr><td colspan=2 valign="top"></td><td rowspan="8" valign="top"><img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/38.0361161,-78.503148/14?mapSize=250,250&pp=38.0361161,-78.503148;1;S&key=Ai6VSxrizWV03n4cSybVIDly6a_jDQB_ianC9MAn4qSEs2gUiQIdmAHT7S2n_tX7" alt="Bing Map" /></td></tr><tr valign="top"><td width="120">Owner: </td><td>johndoe</td></tr><tr valign="top"><td width="120">Location: </td><td>--</td></tr><tr valign="top"><td width="120">Activity Type: </td><td>Running</td></tr><tr valign="top"><td width="120">Event Type: </td><td>Uncategorized</td></tr><tr valign="top"><td width="120">Distance: </td><td>3.00 Mile</td></tr><tr valign="top"><td width="120">Time: </td><td>00:27:16</td></tr><tr valign="top"><td width="120">Elevation Gain: </td><td>131 Feet</td></tr></table>]]></description>
|
|
128
|
+
<link>http://connect.garmin.com/activity/88888888</link>
|
|
129
|
+
<guid>http://connect.garmin.com/activity/88888888</guid>
|
|
130
|
+
<pubDate>Thu, 30 Jun 2011 06:17:20 -0400</pubDate>
|
|
131
|
+
<georss:point>38.0361161 -78.503148</georss:point>
|
|
132
|
+
</item>
|
|
133
|
+
<item>
|
|
134
|
+
<title>3 miles @ easy pace</title>
|
|
135
|
+
<category>Running</category>
|
|
136
|
+
<category>running</category>
|
|
137
|
+
<category>Uncategorized</category>
|
|
138
|
+
<category>uncategorized</category>
|
|
139
|
+
<description><![CDATA[<table width="500" border="0" cellpadding="0" cellspacing="5"><tr><td colspan=2 valign="top"></td><td rowspan="8" valign="top"><img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/38.9505955,-77.3536567/14?mapSize=250,250&pp=38.9505955,-77.3536567;1;S&key=Ai6VSxrizWV03n4cSybVIDly6a_jDQB_ianC9MAn4qSEs2gUiQIdmAHT7S2n_tX7" alt="Bing Map" /></td></tr><tr valign="top"><td width="120">Owner: </td><td>johndoe</td></tr><tr valign="top"><td width="120">Location: </td><td>--</td></tr><tr valign="top"><td width="120">Activity Type: </td><td>Running</td></tr><tr valign="top"><td width="120">Event Type: </td><td>Uncategorized</td></tr><tr valign="top"><td width="120">Distance: </td><td>3.00 Mile</td></tr><tr valign="top"><td width="120">Time: </td><td>00:26:12</td></tr><tr valign="top"><td width="120">Elevation Gain: </td><td>184 Feet</td></tr></table>]]></description>
|
|
140
|
+
<link>http://connect.garmin.com/activity/99999998</link>
|
|
141
|
+
<guid>http://connect.garmin.com/activity/99999998</guid>
|
|
142
|
+
<pubDate>Thu, 23 Jun 2011 06:21:09 -0400</pubDate>
|
|
143
|
+
<georss:point>38.9505955 -77.3536567</georss:point>
|
|
144
|
+
</item>
|
|
145
|
+
<item>
|
|
146
|
+
<title>7 miles @ easy pace</title>
|
|
147
|
+
<category>Running</category>
|
|
148
|
+
<category>running</category>
|
|
149
|
+
<category>Uncategorized</category>
|
|
150
|
+
<category>uncategorized</category>
|
|
151
|
+
<description><![CDATA[<table width="500" border="0" cellpadding="0" cellspacing="5"><tr><td colspan=2 valign="top"></td><td rowspan="8" valign="top"><img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/38.8634934,-77.0668116/14?mapSize=250,250&pp=38.8634934,-77.0668116;1;S&key=Ai6VSxrizWV03n4cSybVIDly6a_jDQB_ianC9MAn4qSEs2gUiQIdmAHT7S2n_tX7" alt="Bing Map" /></td></tr><tr valign="top"><td width="120">Owner: </td><td>johndoe</td></tr><tr valign="top"><td width="120">Location: </td><td>--</td></tr><tr valign="top"><td width="120">Activity Type: </td><td>Running</td></tr><tr valign="top"><td width="120">Event Type: </td><td>Uncategorized</td></tr><tr valign="top"><td width="120">Distance: </td><td>7.00 Mile</td></tr><tr valign="top"><td width="120">Time: </td><td>01:00:52</td></tr><tr valign="top"><td width="120">Elevation Gain: </td><td>216 Feet</td></tr></table>]]></description>
|
|
152
|
+
<link>http://connect.garmin.com/activity/99999999</link>
|
|
153
|
+
<guid>http://connect.garmin.com/activity/99999999</guid>
|
|
154
|
+
<pubDate>Sun, 19 Jun 2011 07:35:53 -0400</pubDate>
|
|
155
|
+
<georss:point>38.8634934 -77.0668116</georss:point>
|
|
156
|
+
</item>
|
|
157
|
+
</channel>
|
|
158
|
+
</rss>
|
|
159
|
+
|
|
160
|
+
http_version: "1.1"
|
metadata
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: stratify-garmin
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
prerelease:
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Jason Rudolph
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
|
|
13
|
+
date: 2011-07-16 00:00:00 Z
|
|
14
|
+
dependencies:
|
|
15
|
+
- !ruby/object:Gem::Dependency
|
|
16
|
+
name: nokogiri
|
|
17
|
+
prerelease: false
|
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
19
|
+
none: false
|
|
20
|
+
requirements:
|
|
21
|
+
- - ~>
|
|
22
|
+
- !ruby/object:Gem::Version
|
|
23
|
+
version: 1.4.4
|
|
24
|
+
type: :runtime
|
|
25
|
+
version_requirements: *id001
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: railties
|
|
28
|
+
prerelease: false
|
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
30
|
+
none: false
|
|
31
|
+
requirements:
|
|
32
|
+
- - ~>
|
|
33
|
+
- !ruby/object:Gem::Version
|
|
34
|
+
version: 3.1.0.rc1
|
|
35
|
+
type: :runtime
|
|
36
|
+
version_requirements: *id002
|
|
37
|
+
- !ruby/object:Gem::Dependency
|
|
38
|
+
name: stratify-base
|
|
39
|
+
prerelease: false
|
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
|
41
|
+
none: false
|
|
42
|
+
requirements:
|
|
43
|
+
- - ~>
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: 0.1.0
|
|
46
|
+
type: :runtime
|
|
47
|
+
version_requirements: *id003
|
|
48
|
+
- !ruby/object:Gem::Dependency
|
|
49
|
+
name: thoughtafter-simple-rss
|
|
50
|
+
prerelease: false
|
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
|
52
|
+
none: false
|
|
53
|
+
requirements:
|
|
54
|
+
- - ~>
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: 1.2.3
|
|
57
|
+
type: :runtime
|
|
58
|
+
version_requirements: *id004
|
|
59
|
+
- !ruby/object:Gem::Dependency
|
|
60
|
+
name: database_cleaner
|
|
61
|
+
prerelease: false
|
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
|
63
|
+
none: false
|
|
64
|
+
requirements:
|
|
65
|
+
- - ~>
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: 0.6.7
|
|
68
|
+
type: :development
|
|
69
|
+
version_requirements: *id005
|
|
70
|
+
- !ruby/object:Gem::Dependency
|
|
71
|
+
name: fakeweb
|
|
72
|
+
prerelease: false
|
|
73
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
|
74
|
+
none: false
|
|
75
|
+
requirements:
|
|
76
|
+
- - ~>
|
|
77
|
+
- !ruby/object:Gem::Version
|
|
78
|
+
version: 1.3.0
|
|
79
|
+
type: :development
|
|
80
|
+
version_requirements: *id006
|
|
81
|
+
- !ruby/object:Gem::Dependency
|
|
82
|
+
name: rspec
|
|
83
|
+
prerelease: false
|
|
84
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
|
85
|
+
none: false
|
|
86
|
+
requirements:
|
|
87
|
+
- - ~>
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: 2.6.0
|
|
90
|
+
type: :development
|
|
91
|
+
version_requirements: *id007
|
|
92
|
+
- !ruby/object:Gem::Dependency
|
|
93
|
+
name: vcr
|
|
94
|
+
prerelease: false
|
|
95
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
|
96
|
+
none: false
|
|
97
|
+
requirements:
|
|
98
|
+
- - ~>
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: 1.10.0
|
|
101
|
+
type: :development
|
|
102
|
+
version_requirements: *id008
|
|
103
|
+
description: Garmin Connect plugin for Stratify
|
|
104
|
+
email:
|
|
105
|
+
- jason@jasonrudolph.com
|
|
106
|
+
executables: []
|
|
107
|
+
|
|
108
|
+
extensions: []
|
|
109
|
+
|
|
110
|
+
extra_rdoc_files: []
|
|
111
|
+
|
|
112
|
+
files:
|
|
113
|
+
- .gitignore
|
|
114
|
+
- .rvmrc
|
|
115
|
+
- Gemfile
|
|
116
|
+
- Gemfile.lock
|
|
117
|
+
- LICENSE
|
|
118
|
+
- README.md
|
|
119
|
+
- Rakefile
|
|
120
|
+
- app/assets/images/garmin-icon-16.png
|
|
121
|
+
- app/assets/images/garmin-icon-24.png
|
|
122
|
+
- lib/stratify-garmin.rb
|
|
123
|
+
- lib/stratify-garmin/activity.rb
|
|
124
|
+
- lib/stratify-garmin/collector.rb
|
|
125
|
+
- lib/stratify-garmin/engine.rb
|
|
126
|
+
- lib/stratify-garmin/presenter.rb
|
|
127
|
+
- lib/stratify-garmin/rss_item_adapter.rb
|
|
128
|
+
- lib/stratify-garmin/version.rb
|
|
129
|
+
- spec/mongoid.yml
|
|
130
|
+
- spec/spec_helper.rb
|
|
131
|
+
- spec/stratify-garmin/activity_spec.rb
|
|
132
|
+
- spec/stratify-garmin/integration_spec.rb
|
|
133
|
+
- spec/stratify-garmin/presenter_spec.rb
|
|
134
|
+
- spec/support/vcr_setup.rb
|
|
135
|
+
- stratify-garmin.gemspec
|
|
136
|
+
- vcr_cassettes/garmin.yml
|
|
137
|
+
homepage: http://github.com/jasonrudolph/stratify/
|
|
138
|
+
licenses: []
|
|
139
|
+
|
|
140
|
+
post_install_message:
|
|
141
|
+
rdoc_options: []
|
|
142
|
+
|
|
143
|
+
require_paths:
|
|
144
|
+
- lib
|
|
145
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
|
+
none: false
|
|
147
|
+
requirements:
|
|
148
|
+
- - ">="
|
|
149
|
+
- !ruby/object:Gem::Version
|
|
150
|
+
version: "0"
|
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
|
+
none: false
|
|
153
|
+
requirements:
|
|
154
|
+
- - ">="
|
|
155
|
+
- !ruby/object:Gem::Version
|
|
156
|
+
version: "0"
|
|
157
|
+
requirements: []
|
|
158
|
+
|
|
159
|
+
rubyforge_project: stratify-garmin
|
|
160
|
+
rubygems_version: 1.8.5
|
|
161
|
+
signing_key:
|
|
162
|
+
specification_version: 3
|
|
163
|
+
summary: Garmin Connect plugin for Stratify
|
|
164
|
+
test_files:
|
|
165
|
+
- spec/mongoid.yml
|
|
166
|
+
- spec/spec_helper.rb
|
|
167
|
+
- spec/stratify-garmin/activity_spec.rb
|
|
168
|
+
- spec/stratify-garmin/integration_spec.rb
|
|
169
|
+
- spec/stratify-garmin/presenter_spec.rb
|
|
170
|
+
- spec/support/vcr_setup.rb
|