tracky 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 59a72acde50576b51f1efaaa4a41bb14911fb2f6
4
+ data.tar.gz: 2c2d5e078e95a8bbc42a39e81e98462ff4819d67
5
+ SHA512:
6
+ metadata.gz: ed7bcfec6b5ac66f1d15f97f88e63009843adbfbfa9daceb2ca82f3738313f3286d30fa1103bc027b2b9021c3834c53fe928b2e3372e2c2ca560b8b44c6972ba
7
+ data.tar.gz: 1236199abcbc679f2661a85a1d4240956b473187428b175ecd428419ecde0834c6ffc2bc6d9e258f24e9af319faa08d01bf965ddfbbd4f1d1e2290c3a31f7bce
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.5
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in tracky.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2016 Jeremy Woertink
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,33 @@
1
+ # Tracky
2
+
3
+ **NOTE** Under development. Not ready for production use
4
+
5
+ Ruby gem for the [Tracky API](http://tracky.com/).
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'tracky'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install tracky
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Contributing
28
+
29
+ 1. Fork it ( https://github.com/[my-github-username]/tracky/fork )
30
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
31
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
32
+ 4. Push to the branch (`git push origin my-new-feature`)
33
+ 5. Create a new Pull Request
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
7
+
@@ -0,0 +1,18 @@
1
+ require 'tracky/version'
2
+ require 'tracky/configuration'
3
+ require 'tracky/base_api'
4
+ require 'tracky/group'
5
+ require 'tracky/comment'
6
+ require 'json'
7
+ require 'http'
8
+
9
+ module Tracky
10
+ class << self
11
+ attr_accessor :configuration
12
+
13
+ def configure
14
+ self.configuration ||= Configuration.new
15
+ yield(configuration)
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ module Tracky
2
+ class BaseAPI
3
+ URI = "http://tracky.com/api/#{Tracky::API_VERSION}"
4
+
5
+ def self.url(path)
6
+ [URI, "#{path}.json"].join('/')
7
+ end
8
+
9
+ def self.get(path)
10
+ response = HTTP.get(path)
11
+ json = JSON.parse(response.to_s)
12
+ if json.has_key? "error"
13
+ raise "#{json["error"]["type"]}: #{json["error"]["message"]}"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ module Tracky
2
+ class Comment < BaseAPI
3
+ attr_accessor :id, :content
4
+
5
+ # If there's an ID, update comment by the ID
6
+ # else just create the new one
7
+ def save
8
+ #code
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ module Tracky
2
+ class Configuration
3
+ attr_accessor :api_key
4
+
5
+ def initialize
6
+
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,14 @@
1
+ module Tracky
2
+ class Group < BaseAPI
3
+ attr_accessor :id, :path_vanity, :name,
4
+ :bio, :vanity, :email,
5
+ :location, :phone, :url,
6
+ :latitude, :longitude,
7
+ :icon, :type, :deleted, :private
8
+
9
+ def self.all
10
+ get(url("groups"))
11
+ end
12
+
13
+ end
14
+ end
@@ -0,0 +1,4 @@
1
+ module Tracky
2
+ VERSION = "0.0.1"
3
+ API_VERSION = 4
4
+ end
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'tracky'
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe Tracky do
4
+ it 'has a version number' do
5
+ expect(Tracky::VERSION).not_to be nil
6
+ end
7
+
8
+ it 'does something useful' do
9
+ expect(false).to eq(true)
10
+ end
11
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'tracky/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "tracky"
8
+ spec.version = Tracky::VERSION
9
+ spec.authors = ["Jeremy Woertink"]
10
+ spec.email = ["jeremywoertink@gmail.com"]
11
+ spec.summary = %q{Ruby Gem for Tracky.com API}
12
+ spec.description = %q{Ruby Gem for Tracky.com API}
13
+ spec.homepage = "https://github.com/jwoertink/tracky"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "rspec"
24
+ spec.add_dependency "http"
25
+ end
metadata ADDED
@@ -0,0 +1,118 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tracky
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jeremy Woertink
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-02-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: http
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Ruby Gem for Tracky.com API
70
+ email:
71
+ - jeremywoertink@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
79
+ - Gemfile
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - lib/tracky.rb
84
+ - lib/tracky/base_api.rb
85
+ - lib/tracky/comment.rb
86
+ - lib/tracky/configuration.rb
87
+ - lib/tracky/group.rb
88
+ - lib/tracky/version.rb
89
+ - spec/spec_helper.rb
90
+ - spec/tracky_spec.rb
91
+ - tracky.gemspec
92
+ homepage: https://github.com/jwoertink/tracky
93
+ licenses:
94
+ - MIT
95
+ metadata: {}
96
+ post_install_message:
97
+ rdoc_options: []
98
+ require_paths:
99
+ - lib
100
+ required_ruby_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ requirements: []
111
+ rubyforge_project:
112
+ rubygems_version: 2.4.3
113
+ signing_key:
114
+ specification_version: 4
115
+ summary: Ruby Gem for Tracky.com API
116
+ test_files:
117
+ - spec/spec_helper.rb
118
+ - spec/tracky_spec.rb