autodeploy 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f2a280fe007587d92b7a09fde5229f762f1b026
4
- data.tar.gz: 44a0c87cdc93755f79ec9830f7751a066f4f2e8c
3
+ metadata.gz: 46751e33ef5ccb5333b1ab00092f52995bef8ce4
4
+ data.tar.gz: 1736806359124af7e527e285bcab54debe988659
5
5
  SHA512:
6
- metadata.gz: 28f62cc0d8b5bed8533fcae194c1b1111120411b760faf034172980bc4ec2ef6e85a8b2ba5773983a1b270bb029f44f3a9e717408b48984f21dec6882857f3db
7
- data.tar.gz: eca02228ba99b643295ff0bbdc5ff59d4e2ce35e680e3622a94448e930d9fe5128211e7c13d0c5cab5218338eab913ff9f352ecdc23e5dbe9149c94c75f6ea31
6
+ metadata.gz: a4f29c848c3f485032978d13f5207e5bfcac0da1a76bd898324adc52ca5b6a1cf1b337bf956e7e2bd97390f85994d9538c48724183a1ef6604bf5b33559a312a
7
+ data.tar.gz: 05e059b3c6be8f10ceab82bcf1b675f60b28c38e6ed6b39fe3a5b89cbbc9bed569beed68fa378230ec1d21db4a34254d3e6bacae13aaf322e758fe18256dc20b
data/.gitignore CHANGED
@@ -15,5 +15,5 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
- config/autodeploy.yml
18
+ config.yml
19
19
  downloads/
data/README.md CHANGED
@@ -1,24 +1,36 @@
1
1
  # Autodeploy
2
2
 
3
- TODO: Write a gem description
3
+ A simple daemon that will download assets from Jenkins
4
4
 
5
5
  ## Installation
6
6
 
7
- Add this line to your application's Gemfile:
7
+ Install the daemon locally via gem:
8
8
 
9
- gem 'autodeploy'
9
+ gem install autodeploy
10
+
11
+ Create a `config.yml`
10
12
 
11
- And then execute:
13
+ ## Usage
12
14
 
13
- $ bundle
15
+ Run directly with:
14
16
 
15
- Or install it yourself as:
17
+ autodeploy
18
+
19
+ Run as a daemon with:
16
20
 
17
- $ gem install autodeploy
21
+ autodeploy -d
22
+
23
+ ## Config
18
24
 
19
- ## Usage
25
+ You'll need to specify a config file in YAML.
20
26
 
21
- TODO: Write usage instructions here
27
+ ```yaml
28
+ server_url: https://yourserver.com
29
+ username: some_username
30
+ password: some_password
31
+ job: my-job-name
32
+ download_dir: downloads
33
+ ```
22
34
 
23
35
  ## Contributing
24
36
 
data/autodeploy.gemspec CHANGED
@@ -6,11 +6,11 @@ require 'autodeploy/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "autodeploy"
8
8
  spec.version = Autodeploy::VERSION
9
- spec.authors = ["Bob Breznak"]
10
- spec.email = ["bob.breznak@gmail.com"]
11
- spec.description = %q{Write a gem description}
12
- spec.summary = %q{Write a gem summary}
13
- spec.homepage = ""
9
+ spec.authors = ["Bob Breznak", "Merk Greene"]
10
+ spec.email = ["bob@evertrue.com", "mark@evertrue.com"]
11
+ spec.description = %q{A simple daemon that checks and downloads assets from Jenkins}
12
+ spec.summary = %q{A simple daemon that checks and downloads assets from Jenkins}
13
+ spec.homepage = "https://github.com/evertrue/autodeploy"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
data/bin/autodeploy CHANGED
@@ -1,5 +1,23 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require 'rubygems'
3
4
  require 'autodeploy'
5
+ require 'dante'
4
6
 
5
- Autodeploy::Job.new.daemonize(10)
7
+ runner = Dante::Runner.new('autodeploy')
8
+ runner.description = 'A simple daemon for checking and deploying assets from Jenkins'
9
+
10
+ runner.with_options do |opts|
11
+ opts.on('-c', '--config FILE', String, "Path to the config file. Default: config.yml") do |config|
12
+ options[:config] = config
13
+ end
14
+
15
+ opts.on('-s', '--sleep SECONDS', Integer, "Number of seconds between checks. Default: 10") do |sleep|
16
+ options[:sleep] = sleep
17
+ end
18
+ end
19
+
20
+ runner.execute do |opts|
21
+ puts opts
22
+ Autodeploy::Job.new(opts[:config] || 'config.yml').daemonize(opts[:sleep] || 10)
23
+ end
data/lib/autodeploy.rb CHANGED
@@ -12,8 +12,8 @@ module Autodeploy
12
12
  puts "[#{DateTime.now.strftime}] #{message}"
13
13
  end
14
14
 
15
- def initialize
16
- @config = YAML.load_file(File.join('config', 'autodeploy.yml'))
15
+ def initialize(configfile)
16
+ @config = YAML.load_file(configfile)
17
17
  @client = JenkinsApi::Client.new(@config)
18
18
 
19
19
  unless Dir.exist? @config['download_dir']
@@ -1,3 +1,3 @@
1
1
  module Autodeploy
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autodeploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Breznak
8
+ - Merk Greene
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
@@ -66,12 +67,12 @@ dependencies:
66
67
  - - '>='
67
68
  - !ruby/object:Gem::Version
68
69
  version: '0'
69
- description: Write a gem description
70
+ description: A simple daemon that checks and downloads assets from Jenkins
70
71
  email:
71
- - bob.breznak@gmail.com
72
+ - bob@evertrue.com
73
+ - mark@evertrue.com
72
74
  executables:
73
75
  - autodeploy
74
- - autodeploy_daemon
75
76
  extensions: []
76
77
  extra_rdoc_files: []
77
78
  files:
@@ -82,10 +83,9 @@ files:
82
83
  - Rakefile
83
84
  - autodeploy.gemspec
84
85
  - bin/autodeploy
85
- - bin/autodeploy_daemon
86
86
  - lib/autodeploy.rb
87
87
  - lib/autodeploy/version.rb
88
- homepage: ''
88
+ homepage: https://github.com/evertrue/autodeploy
89
89
  licenses:
90
90
  - MIT
91
91
  metadata: {}
@@ -108,6 +108,6 @@ rubyforge_project:
108
108
  rubygems_version: 2.0.0
109
109
  signing_key:
110
110
  specification_version: 4
111
- summary: Write a gem summary
111
+ summary: A simple daemon that checks and downloads assets from Jenkins
112
112
  test_files: []
113
113
  has_rdoc:
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'rubygems'
4
- require 'autodeploy'
5
- require 'dante'
6
-
7
- Dante.run('autodeploy') do |opts|
8
- Autodeploy::Job.new.daemonize(10)
9
- end