middleman-pry 0.0.2

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 692c1c9634a72ab4b50d37bd68699fc153dc9e54
4
+ data.tar.gz: 21a08233b45596e49c1c4d944754f33ce12833a6
5
+ SHA512:
6
+ metadata.gz: 90ca216150c4fa5868545ca013b3a56baf23476ab6d2aab184516543d268283e71b2362c565822ae10a2cf1745dfaa94faa8f326a142c4824820316b4477bf57
7
+ data.tar.gz: 43d19f4755648185033f5db93715998dde9a521aa1d746cc42dc9fa14fd2f0f25486cf66d14f77dee28f38cb6a46e51f32d4075416976da73af83c77c85d4aaf
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ # Ignore bundler lock file
2
+ /Gemfile.lock
3
+
4
+ # Ignore pkg folder
5
+ /pkg
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ gem 'rake'
7
+ gem 'rdoc'
8
+ gem 'yard'
9
+ end
10
+
11
+ group :test do
12
+ gem 'cucumber'
13
+ gem 'fivemat'
14
+ gem 'aruba'
15
+ gem 'rspec'
16
+ end
data/LICENSE.md ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Andrew Kvalheim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,105 @@
1
+ # middleman-pry
2
+
3
+ Replaces [Middleman's][middleman] built-in console with [Pry][], à la
4
+ [pry-rails][].
5
+
6
+ ## Installation
7
+
8
+ Add to your `Gemfile`:
9
+
10
+ ```ruby
11
+ gem 'middleman-pry'
12
+ ```
13
+
14
+ and run `bundle install`.
15
+
16
+ ## Usage
17
+
18
+ Start the Middleman console like normal:
19
+
20
+ ```shell
21
+ $ middleman console
22
+ ```
23
+
24
+ You should find yourself in a Pry session in the context of your Middleman app:
25
+
26
+ ```
27
+ $ ls
28
+ Middleman::Configuration::Global#methods:
29
+ config method_missing respond_to? set settings
30
+ Hooks#methods: run_hook
31
+ Middleman::CoreExtensions::Extensions::InstanceMethods#methods:
32
+ activate extensions
33
+ Middleman::CoreExtensions::Request::InstanceMethods#methods:
34
+ call current_path halt mime_type process_request req= send_file
35
+ call! current_path= map not_found req request use
36
+ Middleman::CoreExtensions::FileWatcher::InstanceMethods#methods: files
37
+ Middleman::CoreExtensions::Data::InstanceMethods#methods: data
38
+ Middleman::CoreExtensions::Rendering::InstanceMethods#methods:
39
+ current_engine locate_layout render_individual_file template_extensions
40
+ current_engine= options_for_ext render_template wrap_layout
41
+ fetch_layout render resolve_template
42
+ Middleman::Sitemap::Extensions::RequestEndpoints::InstanceMethods#methods:
43
+ endpoint endpoint_manager
44
+ Middleman::Sitemap::Extensions::Proxies::InstanceMethods#methods:
45
+ proxy proxy_manager
46
+ Middleman::Sitemap::Extensions::Ignores::InstanceMethods#methods:
47
+ ignore ignore_manager
48
+ Middleman::Sitemap::Extensions::Redirects::InstanceMethods#methods:
49
+ redirect redirect_manager
50
+ Middleman::Sitemap::InstanceMethods#methods:
51
+ current_page current_resource sitemap
52
+ Middleman::CoreExtensions::Routing#methods: page with_layout
53
+ Padrino::Helpers::OutputHelpers#methods:
54
+ block_is_template? concat concat_safe_content content_for?
55
+ capture concat_content content_for yield_content
56
+ Padrino::Helpers::TagHelpers#methods: input_tag safe_content_tag tag
57
+ Padrino::Helpers::AssetTagHelpers#methods:
58
+ favicon_tag flash_tag image_tag mail_to stylesheet_link_tag
59
+ feed_tag image_path javascript_include_tag meta_tag
60
+ Padrino::Helpers::FormHelpers#methods:
61
+ button_tag file_field_tag radio_button_tag
62
+ button_to form_for search_field_tag
63
+ check_box_tag hidden_field_tag select_tag
64
+ csrf_token_field hidden_form_method_field submit_tag
65
+ email_field_tag image_submit_tag telephone_field_tag
66
+ error_message_on label_tag text_area_tag
67
+ error_messages_for number_field_tag text_field_tag
68
+ field_set_tag password_field_tag url_field_tag
69
+ fields_for phone_field_tag
70
+ Padrino::Helpers::FormatHelpers#methods:
71
+ distance_of_time_in_words h! sanitize_html truncate
72
+ escape_html highlight simple_format truncate_words
73
+ escape_javascript js_escape_html strip_tags word_wrap
74
+ h pluralize time_ago_in_words
75
+ Padrino::Helpers::RenderHelpers#methods: partial render_partial
76
+ Padrino::Helpers::NumberHelpers#methods:
77
+ number_to_currency number_to_percentage number_with_precision
78
+ number_to_human_size number_with_delimiter
79
+ Padrino::Helpers::Breadcrumbs#methods: breadcrumbs
80
+ Middleman::Application#methods:
81
+ after_build build? full_path logger
82
+ after_configuration build_config helpers ready
83
+ after_render cache initialized root
84
+ before configure inspect root_path
85
+ before_configuration development? instance_available source_dir
86
+ before_render development_config instrument to_s
87
+ #<Module:0x000000017cd980>#methods: template_data_for_file
88
+ #<Module:0x00000001509f78>#methods:
89
+ asset_path auto_find_proper_handler auto_tag form_tag url_for
90
+ asset_stamp auto_javascript_include_tag capture_html link_to
91
+ asset_url auto_stylesheet_link_tag content_tag page_classes
92
+ #<Module:0x000000018b2e68>#methods: lorem placekitten
93
+ self.methods: __pry__
94
+ instance variables:
95
+ @_endpoint_manager @_proxy_manager @_template_extensions
96
+ @_files_api @_redirect_manager @extensions
97
+ @_ignore_manager @_sitemap
98
+ locals: _ __ _dir_ _ex_ _file_ _in_ _out_ _pry_ resource
99
+ $
100
+ ```
101
+
102
+
103
+ [middleman]: http://middlemanapp.com/
104
+ [pry]: http://pryrepl.org/
105
+ [pry-rails]: https://github.com/rweng/pry-rails
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'cucumber/rake/task'
5
+
6
+ Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
7
+ t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}"
8
+ end
9
+
10
+ require 'rake/clean'
11
+
12
+ task :test => ['cucumber']
13
+
14
+ task :default => :test
@@ -0,0 +1,4 @@
1
+ PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
2
+ require "middleman-core"
3
+ require "middleman-core/step_definitions"
4
+ require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-pry')
@@ -0,0 +1,24 @@
1
+ require 'middleman-core/cli'
2
+
3
+ # Override the built-in console command
4
+ class Middleman::Cli::Console
5
+ def console
6
+ require 'middleman-core'
7
+ require 'pry'
8
+
9
+ instance_options = {
10
+ :environment => options['environment'],
11
+ :verbose => options['verbose']
12
+ }
13
+
14
+ @instance = ::Middleman::Application.server.inst do
15
+ if instance_options[:environment]
16
+ set :environment, instance_options[:environment].to_sym
17
+ end
18
+
19
+ logger(instance_options[:verbose] ? 0 : 1, false)
20
+ end
21
+
22
+ @instance.pry
23
+ end
24
+ end
@@ -0,0 +1 @@
1
+ require 'middleman-pry'
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = 'middleman-pry'
6
+ gem.version = '0.0.2'
7
+ gem.platform = Gem::Platform::RUBY
8
+ gem.license = 'MIT'
9
+ gem.authors = ['Andrew Kvalheim']
10
+ gem.email = ['Andrew@Kvalhe.im']
11
+ gem.homepage = 'https://github.com/AndrewKvalheim/middleman-pry'
12
+ gem.summary = %q{Use Pry as the Middleman console.}
13
+
14
+ gem.files = `git ls-files -z`.split("\0")
15
+ gem.test_files = gem.files.grep(%r{^(features|fixtures)/})
16
+ gem.require_paths = ['lib']
17
+
18
+ gem.add_runtime_dependency 'middleman-core', '>= 3.1.0'
19
+ gem.add_runtime_dependency 'pry', '>= 0.9.12'
20
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: middleman-pry
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Andrew Kvalheim
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: middleman-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 3.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 3.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.9.12
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.9.12
41
+ description:
42
+ email:
43
+ - Andrew@Kvalhe.im
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - .gitignore
49
+ - Gemfile
50
+ - LICENSE.md
51
+ - README.md
52
+ - Rakefile
53
+ - features/support/env.rb
54
+ - lib/middleman-pry.rb
55
+ - lib/middleman_extension.rb
56
+ - middleman-pry.gemspec
57
+ homepage: https://github.com/AndrewKvalheim/middleman-pry
58
+ licenses:
59
+ - MIT
60
+ metadata: {}
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 2.1.9
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: Use Pry as the Middleman console.
81
+ test_files:
82
+ - features/support/env.rb
83
+ has_rdoc: