difio-heroku-ruby 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+
6
+ *~
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2012, Alexander Todorov <atodorov [AT] dif.io>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,51 @@
1
+ Registration agent for Difio, preconfigured for Heroku / Ruby
2
+ applications.
3
+
4
+ It compiles a list of installed packages and sends it to http://www.dif.io.
5
+
6
+ Installing inside your Heroku application
7
+ -----------------------------------------
8
+
9
+ - Create an account at http://www.dif.io
10
+
11
+ - Create your Ruby application in Heroku
12
+
13
+ - Configure the following environment variables on Heroku
14
+
15
+ heroku config:set DIFIO_USER_ID=YourUserID
16
+ heroku config:set DIFIO_APP_NAME=MyApplication
17
+ heroku config:set DIFIO_APP_URL=http://myapp.herokuapp.com
18
+
19
+ - Add a dependency in your application's Gemfile
20
+
21
+ ...
22
+ gem 'difio-heroku-ruby'
23
+ ...
24
+
25
+ - Then commit and push your application to Heroku
26
+
27
+ git commit -a -m "added dependency on Difio"
28
+ git push heroku master
29
+
30
+
31
+ - Execute the registration script to submit the information to Difio
32
+
33
+ heroku run /app/.heroku/....
34
+ Running `/app/.heroku/....` attached to terminal... up, run.1
35
+ Success, registered/updated application 8370e3be-6e54-462d-9ca9-224301c29a1d
36
+
37
+
38
+ That's it, you can now check your application statistics at http://www.dif.io
39
+
40
+
41
+
42
+ Updating dependencies
43
+ ----------------------
44
+
45
+ Whenever you change your application to include new dependencies or
46
+ upgrade/downgrade package versions you should re-submit the information to Difio.
47
+
48
+ ::
49
+
50
+ heroku run /app/.heroku/.................
51
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/difio-heroku ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "difio-heroku-ruby"
4
+
5
+ Difio::Heroku.new.cli
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "difio-heroku-ruby/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "difio-heroku-ruby"
7
+ s.version = Difio::Heroku::VERSION
8
+ s.authors = ["Alexander Todorov"]
9
+ s.email = ["atodorov@dif.io"]
10
+ s.homepage = "https://github.com/difio/difio-heroku-ruby"
11
+ s.summary = %q{Difio registration agent for Heroku / Ruby applications}
12
+ s.description = %q{Difio registration agent for Heroku / Ruby applications. See the README for usage.}
13
+
14
+ s.rubyforge_project = "difio-heroku-ruby"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ # s.add_development_dependency "rspec"
23
+ s.add_runtime_dependency "common-ruby-difio"
24
+ end
@@ -0,0 +1,5 @@
1
+ module Difio
2
+ class Heroku
3
+ VERSION = "1.0.0"
4
+ end
5
+ end
@@ -0,0 +1,15 @@
1
+ require "common-ruby-difio"
2
+
3
+ module Difio
4
+ class Heroku < Difio::DifioBase
5
+ configure({
6
+ 'user_id' => ENV['DIFIO_USER_ID'],
7
+ 'app_name' => ENV['DIFIO_APP_NAME'],
8
+ 'app_uuid' => ENV['HOSTNAME'], # this looks like an UUID
9
+ 'app_type' => 'ruby-' + RUBY_VERSION,
10
+ 'app_url' => ENV['DIFIO_APP_URL'],
11
+ 'app_vendor' => 2, # Heroku
12
+ 'url' => ENV['DIFIO_REGISTER_URL'],
13
+ })
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: difio-heroku-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Alexander Todorov
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-29 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: common-ruby-difio
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Difio registration agent for Heroku / Ruby applications. See the README
31
+ for usage.
32
+ email:
33
+ - atodorov@dif.io
34
+ executables:
35
+ - difio-heroku
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - .gitignore
40
+ - Gemfile
41
+ - LICENSE
42
+ - README.md
43
+ - Rakefile
44
+ - bin/difio-heroku
45
+ - difio-heroku-ruby.gemspec
46
+ - lib/difio-heroku-ruby.rb
47
+ - lib/difio-heroku-ruby/version.rb
48
+ homepage: https://github.com/difio/difio-heroku-ruby
49
+ licenses: []
50
+ post_install_message:
51
+ rdoc_options: []
52
+ require_paths:
53
+ - lib
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ requirements: []
67
+ rubyforge_project: difio-heroku-ruby
68
+ rubygems_version: 1.8.24
69
+ signing_key:
70
+ specification_version: 3
71
+ summary: Difio registration agent for Heroku / Ruby applications
72
+ test_files: []
73
+ has_rdoc: