capistrano-sinatra-console 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b7b8025414a0a4d3e30d8b3fcc7ce401789f0115
4
+ data.tar.gz: 2f0b822e160ecc11610684c69329b1ace24b7904
5
+ SHA512:
6
+ metadata.gz: 104869010a6ee4bae4e1008f2bfa4c3f74d25539011969a48be1c82f33fd6d112e9b0a899e4b4dbe723b4f23048121339f9a63e108d86da9a82f64621c731814
7
+ data.tar.gz: 56b7c7a840a9c852736707f36a47db358ce792fbff616165d7301f364ff7c6c0e8d67d78b1ad594e2a95801725b40f56f66a1733ff28791482472e343d2fb7c3
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-sinatra-console.gemspec
4
+ gemspec
@@ -0,0 +1,66 @@
1
+ # Capistrano::Sinatra::Console
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/capistrano/sinatra/console`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'capistrano-sinatra-console', require: false
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install capistrano-sinatra-console
22
+
23
+
24
+ ## Usage
25
+ [capistrano-rails-console](https://github.com/ydkn/capistrano-rails-console)
26
+
27
+
28
+ Require in `Capfile` to use the default task:
29
+
30
+ ```ruby
31
+ require 'capistrano/sinatra/console'
32
+ ```
33
+
34
+ Run a remote sinatra console with:
35
+
36
+ $ cap production sinatra:console
37
+
38
+
39
+ ## Options
40
+
41
+ ### Sinatra environment
42
+
43
+ ```ruby
44
+ set :console_env, :production # use different environment than deployment environment (rack_env)
45
+ ```
46
+
47
+ ### Bin
48
+
49
+ Reference: [Rails console equivalent for Sinatra](http://dlj.bz/eA5d2X)
50
+
51
+ Configurable options, shown here with defaults:
52
+
53
+ ```ruby
54
+ set :sinatra_bin, 'irb -I. -r api.rb'
55
+ ```
56
+
57
+ ## Development
58
+
59
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
60
+
61
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
62
+
63
+ ## Contributing
64
+
65
+ Bug reports and pull requests are welcome on GitHub at https://github.com/GraysonChen/capistrano-sinatra-console.
66
+
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "capistrano/sinatra/console"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,38 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'capistrano/sinatra/console/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "capistrano-sinatra-console"
8
+ spec.version = Capistrano::Sinatra::Console::VERSION
9
+ spec.authors = ["Grayson Chen"]
10
+ spec.email = ["cgg5207@sina.com"]
11
+
12
+ spec.summary = %q{Remote sinatra console for capistrano}
13
+ spec.description = %q{Remote sinatra console for capistrano}
14
+ spec.homepage = "https://github.com/GraysonChen/capistrano-sinatra-console"
15
+ spec.license = 'MIT'
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against " \
23
+ "public gem pushes."
24
+ end
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_dependency 'capistrano', '>= 3.5.0', '< 4.0.0'
34
+ spec.add_dependency 'sshkit-interactive', '~> 0.2.0'
35
+
36
+ spec.add_development_dependency "bundler", "~> 1.14"
37
+ spec.add_development_dependency "rake", "~> 10.0"
38
+ end
@@ -0,0 +1,4 @@
1
+ require "capistrano/sinatra/console/version"
2
+ require 'sshkit/interactive'
3
+
4
+ load File.expand_path('../console/tasks.cap', __FILE__)
@@ -0,0 +1,23 @@
1
+ namespace :load do
2
+ task :defaults do
3
+ # Default values
4
+ set :run_bin, -> { fetch(:sinatra_bin, 'irb -I. -r api.rb') }
5
+ set :console_env, -> { fetch(:rack_env, fetch(:stage, 'production')) }
6
+ set :console_user, -> { fetch(:app_user, nil) }
7
+ set :rack_env_bin, "RACK_ENV=#{fetch(:console_env)}"
8
+ end
9
+ end
10
+
11
+ namespace :sinatra do
12
+ desc 'Interact with a remote rails console'
13
+ task :console do
14
+ args = []
15
+ run_interactively primary(:app) do
16
+ within current_path do
17
+ as user: fetch(:console_user) do
18
+ execute(fetch(:rack_env_bin), :bundle, :exec, fetch(:run_bin), *args)
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,7 @@
1
+ module Capistrano
2
+ module Sinatra
3
+ module Console
4
+ VERSION = "0.1.0"
5
+ end
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-sinatra-console
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Grayson Chen
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-06-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.5.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 4.0.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 3.5.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 4.0.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: sshkit-interactive
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: 0.2.0
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: 0.2.0
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.14'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.14'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rake
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '10.0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '10.0'
75
+ description: Remote sinatra console for capistrano
76
+ email:
77
+ - cgg5207@sina.com
78
+ executables: []
79
+ extensions: []
80
+ extra_rdoc_files: []
81
+ files:
82
+ - ".gitignore"
83
+ - Gemfile
84
+ - README.md
85
+ - Rakefile
86
+ - bin/console
87
+ - bin/setup
88
+ - capistrano-sinatra-console.gemspec
89
+ - lib/capistrano/sinatra/console.rb
90
+ - lib/capistrano/sinatra/console/tasks.cap
91
+ - lib/capistrano/sinatra/console/version.rb
92
+ homepage: https://github.com/GraysonChen/capistrano-sinatra-console
93
+ licenses:
94
+ - MIT
95
+ metadata:
96
+ allowed_push_host: https://rubygems.org
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 2.2.2
114
+ signing_key:
115
+ specification_version: 4
116
+ summary: Remote sinatra console for capistrano
117
+ test_files: []