addons 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +20 -7
- data/addons.gemspec +1 -1
- data/lib/addons/config.rb +2 -1
- data/lib/addons/recipes/instructions.rb +2 -2
- data/lib/addons/recipes/recipes.rb +2 -2
- data/lib/addons/version.rb +1 -1
- data/lib/tasks/addons_recipe.rake +46 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a0767f0675d70dc55bef6f7d26bd15cf9c0171c
|
4
|
+
data.tar.gz: 7643b17ce035304c2471d00c9c096ba2c2f4d759
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d97ecdd9016d12c3768818e88af9044759df0da08db2f473b8dc543896346db78e2d39eaf45cad64f9c7a6737d9c224d047d756becf129350b90abc14fb7723
|
7
|
+
data.tar.gz: 6d5d6f2b899caaa594462e749a32a13435e1ecfcddf87101c8abc02d803b16fc0ba93bb3d491a0d179a8d3212294d7be24fe1e32c52514e29fc81b4e346619a9
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
addons (0.1.
|
5
|
-
figaro (~> 0.7
|
6
|
-
json (~> 1.8
|
4
|
+
addons (0.1.3)
|
5
|
+
figaro (~> 0.7)
|
6
|
+
json (~> 1.8)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -101,5 +101,5 @@ DEPENDENCIES
|
|
101
101
|
bundler (~> 1.3)
|
102
102
|
json
|
103
103
|
rails
|
104
|
-
rake (~> 10.3
|
104
|
+
rake (~> 10.3)
|
105
105
|
rspec (~> 2.6)
|
data/README.md
CHANGED
@@ -4,18 +4,19 @@ TODO: Write a gem description
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
Add
|
7
|
+
Add the addons gem and bundle install
|
8
8
|
|
9
9
|
gem 'addons'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
10
|
+
bundle install
|
14
11
|
|
15
12
|
Or install it yourself as:
|
16
13
|
|
17
14
|
$ gem install addons
|
18
15
|
|
16
|
+
Run the Rails generator with your AddonList credentials
|
17
|
+
|
18
|
+
$ rails g addons:install --apiid=<addonsio_api_id> --authtoken=<addonsio_auth_token>
|
19
|
+
|
19
20
|
## Recipe Runner
|
20
21
|
|
21
22
|
To run all recipes related to your app, run this in your Terminal:
|
@@ -36,7 +37,7 @@ Copy and paste this to the rails console to test your email settings
|
|
36
37
|
```ruby
|
37
38
|
class TestMailer < ActionMailer::Base
|
38
39
|
|
39
|
-
default :from => "info@
|
40
|
+
default :from => "info@addons.io"
|
40
41
|
|
41
42
|
def welcome_email
|
42
43
|
mail(:to => "youremail@example.com", :subject => "Test Mailgun SMTP mail", :body => "Test Mailgun SMTP mail body")
|
@@ -57,7 +58,7 @@ Copy and paste this to the rails console to test your email settings
|
|
57
58
|
```ruby
|
58
59
|
email = {
|
59
60
|
to: "youremail@example.com",
|
60
|
-
from: "info@
|
61
|
+
from: "info@addons.io",
|
61
62
|
subject: "Test Mailgun HTTP mail",
|
62
63
|
body: "Test Mailgun HTTP mail body"
|
63
64
|
}
|
@@ -65,6 +66,18 @@ email = {
|
|
65
66
|
Addons::Mailgun.send_simple_message(email)
|
66
67
|
```
|
67
68
|
|
69
|
+
#### Rollbar
|
70
|
+
|
71
|
+
Run the recipe
|
72
|
+
```shell
|
73
|
+
rake addons:recipe:run[rollbar]
|
74
|
+
```
|
75
|
+
|
76
|
+
Test Rollbar by causing an exception, and Rollbar should report it. In a browser visit:
|
77
|
+
```
|
78
|
+
http://localhost:3000/this/route/definitely/wont/exist/and/will/cause/a/RoutingError
|
79
|
+
```
|
80
|
+
|
68
81
|
|
69
82
|
## Contributing
|
70
83
|
|
data/addons.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "addons"
|
8
8
|
spec.version = Addons::VERSION
|
9
9
|
spec.authors = ["Addonlist"]
|
10
|
-
spec.email = ["engineering@
|
10
|
+
spec.email = ["engineering@addons.io"]
|
11
11
|
spec.description = %q{Connect your app to Addons for all your service integrations in one place.}
|
12
12
|
spec.summary = %q{After configuring your app with addons, set app_id and auth_token variables (ENV['ADDONS_API_ID'] and ENV['ADDONS_AUTH_TOKEN']), the gem will pull your services config and set them up for immediate use.}
|
13
13
|
spec.homepage = "https://github.com/addonlist/addons-gem"
|
data/lib/addons/config.rb
CHANGED
@@ -21,14 +21,14 @@ module Addons
|
|
21
21
|
GIT_COMMIT_RECIPE = {
|
22
22
|
"run_msg" => "Committing changes made by #{Addons::Recipe::RECIPE_NAME_PLACEHOLDER} version: #{Addons::Recipe::RECIPE_VERSION_PLACEHOLDER} AddonList recipe",
|
23
23
|
"type" => InstructionTypes::TERMINAL_COMMAND,
|
24
|
-
"command" => "git add .; git commit -m \"
|
24
|
+
"command" => "git add .; git commit -m \"ADDONS.IO RECIPE - #{Addons::Recipe::RECIPE_NAME_PLACEHOLDER} version: #{Addons::Recipe::RECIPE_VERSION_PLACEHOLDER}\"",
|
25
25
|
"expected_result" => {
|
26
26
|
"type" => ResultTypes::NO_EXPECTATION
|
27
27
|
},
|
28
28
|
"error_msg" => "Error: Git commit for this recipe failed.",
|
29
29
|
}
|
30
30
|
GIT_RESET_HARD_HEAD = {
|
31
|
-
"run_msg" => "There was an error, so we're undoing our changes. If you cannot fix this based on the error message, contact support@
|
31
|
+
"run_msg" => "There was an error, so we're undoing our changes. If you cannot fix this based on the error message, contact support@addons.io.",
|
32
32
|
"type" => InstructionTypes::TERMINAL_COMMAND,
|
33
33
|
"command" => "git add .; git reset --hard HEAD",
|
34
34
|
"expected_result" => {
|
@@ -2,7 +2,7 @@ static_recipes = [
|
|
2
2
|
{
|
3
3
|
name: "Mailgun SMTP",
|
4
4
|
handle: "mailgun_smtp",
|
5
|
-
|
5
|
+
revision: "1",
|
6
6
|
platform: "Rails 4",
|
7
7
|
instructions: [
|
8
8
|
# search for existing smtp_settings and comment them out
|
@@ -39,7 +39,7 @@ ActionMailer::Base.delivery_method = :smtp\n\
|
|
39
39
|
{
|
40
40
|
name: "Mailgun HTTP",
|
41
41
|
handle: "mailgun_http",
|
42
|
-
|
42
|
+
revision: "1",
|
43
43
|
platform: "Rails 4",
|
44
44
|
instructions: [
|
45
45
|
# install gem rest_client with Gemfile and run from terminal
|
data/lib/addons/version.rb
CHANGED
@@ -12,7 +12,7 @@ namespace :addons do
|
|
12
12
|
desc "Run a recipe by name"
|
13
13
|
task :run, :recipe_handle do |t, args|
|
14
14
|
recipes = nil
|
15
|
-
recipeUrl = "https://
|
15
|
+
recipeUrl = "https://addons.io/api/v1/addons/apps/recipes?source=rubygem"
|
16
16
|
|
17
17
|
uri = URI.parse(recipeUrl)
|
18
18
|
|
@@ -49,4 +49,48 @@ namespace :addons do
|
|
49
49
|
end # end task: run
|
50
50
|
|
51
51
|
end # end namespace: recipe
|
52
|
-
end # end namespace: addons
|
52
|
+
end # end namespace: addons
|
53
|
+
|
54
|
+
|
55
|
+
# DEBUG RECIPE BELOW
|
56
|
+
|
57
|
+
# require 'net/http'
|
58
|
+
# require 'open-uri'
|
59
|
+
# require 'json'
|
60
|
+
|
61
|
+
# require 'addons/recipes/types'
|
62
|
+
# require 'addons/recipes/recipe'
|
63
|
+
# require 'addons/recipes/instructions'
|
64
|
+
|
65
|
+
# RECIPE = {
|
66
|
+
# "name" => "Rollbar",
|
67
|
+
# "handle" => "rollbar",
|
68
|
+
# "revision" => "1",
|
69
|
+
# "platform" => "Rails 4",
|
70
|
+
# "instructions" => [
|
71
|
+
# # install gem rollbar with Gemfile and run from terminal
|
72
|
+
# {
|
73
|
+
# "run_msg" => "Adding gem 'rollbar' to Gemfile",
|
74
|
+
# "type" => InstructionTypes::MODIFY_CODE,
|
75
|
+
# "command" => {
|
76
|
+
# "type" => ModifyCodeTypes::ADD_CODE,
|
77
|
+
# "file" => "Gemfile",
|
78
|
+
# "code" => "gem 'rollbar'",
|
79
|
+
# "comment_code_if" => /rollbar/,
|
80
|
+
# },
|
81
|
+
# "error_msg" => "Error: Could not add gem 'rollbar' to Gemfile"
|
82
|
+
# },
|
83
|
+
# Addons::Recipe::Instructions::Bundler::BUNDLER_INSTALL,
|
84
|
+
# # run rollbar generator
|
85
|
+
# {
|
86
|
+
# "run_msg" => "rails generate rollbar",
|
87
|
+
# "type" => InstructionTypes::TERMINAL_COMMAND,
|
88
|
+
# "command" => "rails generate rollbar",
|
89
|
+
# "expected_result" => {
|
90
|
+
# "type" => ResultTypes::NO_EXPECTATION
|
91
|
+
# },
|
92
|
+
# "error_msg" => "Error: You have unstaged files or uncommitted changes in Git. Please commit or stash everything so we can start on a clean slate."
|
93
|
+
# },
|
94
|
+
# ]
|
95
|
+
# }
|
96
|
+
# Addons::Recipe.run(RECIPE)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: addons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Addonlist
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
version: '2.6'
|
97
97
|
description: Connect your app to Addons for all your service integrations in one place.
|
98
98
|
email:
|
99
|
-
- engineering@
|
99
|
+
- engineering@addons.io
|
100
100
|
executables: []
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|