difio-openshift-ruby 2.0.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 ADDED
@@ -0,0 +1,6 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+
6
+ *~
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in difio-openshift-ruby.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2012, Svetlozar Argirov <zarrro [AT] gmail.com>
2
+ Copyright (c) 2012, Alexander Todorov <atodorov [AT] otb.bg>
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in
12
+ all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
21
+
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ Registration agent for Difio, preconfigured for OpenShift / Ruby
2
+ applications.
3
+
4
+ It compiles a list of installed packages and sends it to http://www.dif.io.
5
+
6
+ Installing on your OpenShift Ruby application
7
+ -----------------------------------------------------
8
+
9
+ - Create an account at http://www.dif.io
10
+
11
+ - Create your Ruby application in OpenShift
12
+
13
+ rhc app create -a myapp -t ruby-1.8
14
+
15
+ - Add a dependency in your application's Gemfile
16
+
17
+ ...
18
+ gem 'difio-openshift-ruby'
19
+ ...
20
+
21
+ - Set your userID in the ./data/DIFIO_SETTINGS file
22
+
23
+ echo "export DIFIO_USER_ID=YourUserID" > ./data/DIFIO_SETTINGS
24
+
25
+ - Enable the registration script in .openshift/action_hooks/post_deploy
26
+
27
+ cd $OPENSHIFT_REPO_DIR
28
+ source data/DIFIO_SETTINGS
29
+ bundle exec vendor/bundle/ruby/1.8/bin/difio-openshift
30
+
31
+ - Run bundle install to install the Difio gems
32
+
33
+ bundle install
34
+
35
+ - Commit your changes
36
+
37
+ git add .
38
+ git commit -m "enable Difio registration"
39
+
40
+ - Then push your application to OpenShift
41
+
42
+ git push
43
+
44
+ That's it, you can now check your application statistics at http://www.dif.io
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "difio-openshift-ruby"
4
+
5
+ Difio::Openshift.new.cli
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "difio-openshift-ruby/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "difio-openshift-ruby"
7
+ s.version = Difio::Openshift::VERSION
8
+ s.authors = ["Svetlozar Argirov"]
9
+ s.email = ["zarrro@gmail.com"]
10
+ s.homepage = "http://github.com/difio/difio-openshift-ruby"
11
+ s.summary = %q{Difio registration agent for OpenShift / Ruby applications}
12
+ s.description = %q{Difio registration agent for OpenShift / Ruby applications. See the README for Usage.}
13
+
14
+ s.rubyforge_project = "difio-openshift-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,15 @@
1
+ require "common-ruby-difio"
2
+
3
+ module Difio
4
+ class Openshift < Difio::DifioBase
5
+ configure({
6
+ 'user_id' => ENV['DIFIO_USER_ID'],
7
+ 'app_name' => ENV['OPENSHIFT_GEAR_NAME'],
8
+ 'app_uuid' => ENV['OPENSHIFT_GEAR_UUID'],
9
+ 'app_type' => ENV['OPENSHIFT_GEAR_TYPE'],
10
+ 'app_url' => "http://#{ENV['OPENSHIFT_APP_DNS']}/",
11
+ 'app_vendor' => 0,
12
+ 'url' => ENV['DIFIO_REGISTER_URL'],
13
+ })
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ module Difio
2
+ class Openshift
3
+ VERSION = "2.0.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: difio-openshift-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Svetlozar Argirov
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-10 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 OpenShift / Ruby applications. See the README
31
+ for Usage.
32
+ email:
33
+ - zarrro@gmail.com
34
+ executables:
35
+ - difio-openshift
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - .gitignore
40
+ - Gemfile
41
+ - LICENSE
42
+ - README.md
43
+ - Rakefile
44
+ - bin/difio-openshift
45
+ - difio-openshift-ruby.gemspec
46
+ - lib/difio-openshift-ruby.rb
47
+ - lib/difio-openshift-ruby/version.rb
48
+ homepage: http://github.com/difio/difio-openshift-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-openshift-ruby
68
+ rubygems_version: 1.8.24
69
+ signing_key:
70
+ specification_version: 3
71
+ summary: Difio registration agent for OpenShift / Ruby applications
72
+ test_files: []