email-opened 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,17 +1 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
1
+ .DS_Store
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in email-opened.gemspec
3
+ # Specify your gem's dependencies in emailopened.gemspec
4
4
  gemspec
5
+
6
+ gem 'rest-client'
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Dallas Read
1
+ Copyright (c) 2013 Dallas Read
2
2
 
3
3
  MIT License
4
4
 
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
19
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
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.
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # EmailOpened
1
+ # Emailopened
2
2
 
3
- Interact with the EmailOpened API.
3
+ TODO: Write a gem description
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'email-opened'
9
+ gem 'emailopened'
10
10
 
11
11
  And then execute:
12
12
 
@@ -14,53 +14,16 @@ And then execute:
14
14
 
15
15
  Or install it yourself as:
16
16
 
17
- $ gem install email-opened
17
+ $ gem install emailopened
18
18
 
19
19
  ## Usage
20
20
 
21
- To send a message:
22
-
23
- ```
24
- eo = EmailOpened.new(CONFIG["eo_api_key"])
25
- response = eo.send(
26
- to: [
27
- {
28
- email: "another@emailopened.ca",
29
- name: "Another Person",
30
- url: "http://another.com"
31
- },
32
- {
33
- email: "sweet@emailopened.ca",
34
- name: "Sweet Person",
35
- url: "http://sweet.com"
36
- }
37
- ],
38
- message_token: "3k4jk3jf"
39
- )
40
- puts response
41
- ```
42
-
43
- To add a contact to a list:
44
-
45
- ```
46
- eo = EmailOpened.new(CONFIG["eo_api_key"])
47
- response = eo.add_contact(
48
- contacts: [
49
- {
50
- email: "api@emailopened.ca",
51
- name: "API Person",
52
- url: "http://api.com",
53
- list_ids: [1, 2]
54
- }
55
- ]
56
- )
57
- puts response
58
- ```
21
+ TODO: Write usage instructions here
59
22
 
60
23
  ## Contributing
61
24
 
62
25
  1. Fork it
63
26
  2. Create your feature branch (`git checkout -b my-new-feature`)
64
- 3. Commit your changes (`git commit -am 'Added some feature'`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
65
28
  4. Push to the branch (`git push origin my-new-feature`)
66
29
  5. Create new Pull Request
data/Rakefile CHANGED
@@ -1,2 +1 @@
1
- #!/usr/bin/env rake
2
1
  require "bundler/gem_tasks"
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'emailopened/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "email-opened"
8
+ spec.version = EmailOpened::VERSION
9
+ spec.authors = ["Dallas Read"]
10
+ spec.email = ["dallas@emailopened.com"]
11
+ spec.description = "Interact with EmailOpened.com"
12
+ spec.summary = "Interact with EmailOpened.com"
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
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.3"
22
+ spec.add_development_dependency "rake"
23
+ end
@@ -1,5 +1,4 @@
1
- require "email-opened/version"
2
- require "rest_client"
1
+ require "emailopened/version"
3
2
 
4
3
  class EmailOpened
5
4
  def initialize(api_key, version = 1, sandbox = false)
@@ -29,11 +28,6 @@ class EmailOpened
29
28
  puts response
30
29
  end
31
30
 
32
- def forms
33
- response = RestClient.get api_path + "forms", headers
34
- puts response
35
- end
36
-
37
31
  def add_contact(contacts = {})
38
32
  contacts = contacts[:contacts]
39
33
 
@@ -42,11 +36,14 @@ class EmailOpened
42
36
  end
43
37
 
44
38
  def api_path
45
- if @eo_sandbox
39
+ if @eo_sandbox == "development"
46
40
  "http://localhost:3000/api/"
41
+ elsif @eo_sandbox == "edge"
42
+ "http://edge.emailopened.com/api/"
43
+ elsif @eo_sandbox == "staging"
44
+ "http://staging.emailopened.com/api/"
47
45
  else
48
46
  "https://app.emailopened.com/api/"
49
47
  end
50
48
  end
51
49
  end
52
-
@@ -0,0 +1,3 @@
1
+ module EmailOpened
2
+ VERSION = "0.0.14"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email-opened
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,17 +9,33 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-04 00:00:00.000000000 Z
12
+ date: 2013-08-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rest-client
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.3'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
16
32
  requirement: !ruby/object:Gem::Requirement
17
33
  none: false
18
34
  requirements:
19
35
  - - ! '>='
20
36
  - !ruby/object:Gem::Version
21
37
  version: '0'
22
- type: :runtime
38
+ type: :development
23
39
  prerelease: false
24
40
  version_requirements: !ruby/object:Gem::Requirement
25
41
  none: false
@@ -27,7 +43,7 @@ dependencies:
27
43
  - - ! '>='
28
44
  - !ruby/object:Gem::Version
29
45
  version: '0'
30
- description: Interact with the EmailOpened.com API
46
+ description: Interact with EmailOpened.com
31
47
  email:
32
48
  - dallas@emailopened.com
33
49
  executables: []
@@ -36,14 +52,15 @@ extra_rdoc_files: []
36
52
  files:
37
53
  - .gitignore
38
54
  - Gemfile
39
- - LICENSE
55
+ - LICENSE.txt
40
56
  - README.md
41
57
  - Rakefile
42
- - email-opened.gemspec
43
- - lib/email-opened.rb
44
- - lib/email-opened/version.rb
58
+ - emailopened.gemspec
59
+ - lib/emailopened.rb
60
+ - lib/emailopened/version.rb
45
61
  homepage: ''
46
- licenses: []
62
+ licenses:
63
+ - MIT
47
64
  post_install_message:
48
65
  rdoc_options: []
49
66
  require_paths:
@@ -65,5 +82,5 @@ rubyforge_project:
65
82
  rubygems_version: 1.8.23
66
83
  signing_key:
67
84
  specification_version: 3
68
- summary: Send Messages, Retrieve Stats, Etc.
85
+ summary: Interact with EmailOpened.com
69
86
  test_files: []
data/email-opened.gemspec DELETED
@@ -1,19 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/email-opened/version', __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.authors = ["Dallas Read"]
6
- gem.email = ["dallas@emailopened.com"]
7
- gem.description = %q{Interact with the EmailOpened.com API}
8
- gem.summary = %q{Send Messages, Retrieve Stats, Etc.}
9
- gem.homepage = ""
10
-
11
- gem.add_dependency 'rest-client'
12
-
13
- gem.files = `git ls-files`.split($\)
14
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
- gem.name = "email-opened"
17
- gem.require_paths = ["lib"]
18
- gem.version = EmailOpened::VERSION
19
- end
@@ -1,3 +0,0 @@
1
- class EmailOpened
2
- VERSION = "0.0.13"
3
- end