marco-polo 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YTQ1ZmMxMWNmODk2NjgwZjEwNWIzZTJmMzA0MDY1N2JlOGM5YmFmYQ==
5
+ data.tar.gz: !binary |-
6
+ Y2EzYjNjNTA0ZWZiZmE2Y2U4YjA4YWI0NDg5ZGFjYzk2ZTVlOTExMw==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ OTEyNjIyZDZkZmViNjhmM2Y1OWY4Y2U4YjExYjAxNzBkNDcwMDRkZTY1Mjk0
10
+ OWQ1MmMzZTkyNzE3YmE0ZTE0MTUzYjNmYzEwOTBkZmY4YjlhMzM3MDhjYjY5
11
+ MzNiMjBmODM5YjMyMDRhOWExNmMyZjI1ZTI2Yzk2Njk2MzZlZTE=
12
+ data.tar.gz: !binary |-
13
+ YzFiOWQxNDQwNTMyOTI2MDg0MGY1ODM0Y2U4NmY5ZmY1N2ZmMzU4MzY2MmRl
14
+ MzQyODdiOGVjODYwZThmOTI1MTk1MDRhYjY1YWFmYmY3MTExMTJhODNjYTA4
15
+ ZDhmNTI5OTViOWJlNmI5OWFmOWEwZGUzZDkwOTgxZDM2MTc5YmU=
@@ -0,0 +1,24 @@
1
+ if ENV['RAILS_ENV']
2
+ rails_env = ENV['RAILS_ENV'].downcase
3
+ elsif Rails and Rails.env
4
+ rails_env = Rails.env.downcase
5
+ end
6
+
7
+ if rails_env
8
+ current_app = Dir.pwd.split('/').last
9
+
10
+ # shorten some common long environment names
11
+ rails_env = "dev" if rails_env == "development"
12
+ rails_env = "prod" if rails_env == "production"
13
+
14
+ IRB.conf[:PROMPT][:RAILS_ENV] = {
15
+ :PROMPT_I => "#{current_app}(#{rails_env})> ",
16
+ :PROMPT_N => "#{current_app}(#{rails_env})> ",
17
+ :PROMPT_S => nil,
18
+ :PROMPT_C => "?> ",
19
+ :RETURN => "=> %s\n"
20
+ }
21
+
22
+ IRB.conf[:PROMPT_MODE] = :RAILS_ENV
23
+
24
+ end
@@ -0,0 +1,3 @@
1
+ module MarcoPolo
2
+ VERSION = "0.1.0"
3
+ end
data/lib/marco-polo.rb ADDED
@@ -0,0 +1,18 @@
1
+ module MarcoPolo
2
+ class Railtie < Rails::Railtie
3
+ initializer "marco_polo.run_irb_config" do |app|
4
+ app.instance_eval do
5
+ def load_console(app=self)
6
+ super
7
+ ARGV.push "-r", File.join(File.dirname(__FILE__),
8
+ "marco-polo",
9
+ "marco-polo.irbrc.rb")
10
+
11
+ app_specific = File.join(Rails.root, ".irbrc.rb")
12
+ ARGV.push "-r", app_specific if File.exist? app_specific
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/marco-polo/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = "marco-polo"
6
+
7
+ gem.authors = ["Chris Doyle"]
8
+ gem.email = ["archslide@gmail.com"]
9
+ gem.email = "archslide@gmail.com"
10
+
11
+ gem.description = "MarcoPolo shows your app name and environment in your console prompt so you don't accidentally break production"
12
+ gem.summary = "MarcoPolo shows your app name and environment in your console prompt"
13
+ gem.homepage = "http://github.com/arches/marco-polo"
14
+ gem.version = MarcoPolo::VERSION
15
+ gem.license = 'MIT'
16
+
17
+ gem.files = `git ls-files`.split($\)
18
+ gem.require_paths = ["lib"]
19
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: marco-polo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Chris Doyle
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-09 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: MarcoPolo shows your app name and environment in your console prompt
14
+ so you don't accidentally break production
15
+ email: archslide@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/marco-polo.rb
21
+ - lib/marco-polo/marco-polo.irbrc.rb
22
+ - lib/marco-polo/version.rb
23
+ - marco-polo.gemspec
24
+ homepage: http://github.com/arches/marco-polo
25
+ licenses:
26
+ - MIT
27
+ metadata: {}
28
+ post_install_message:
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ! '>='
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubyforge_project:
44
+ rubygems_version: 2.0.7
45
+ signing_key:
46
+ specification_version: 4
47
+ summary: MarcoPolo shows your app name and environment in your console prompt
48
+ test_files: []