Skip to content

Commit

Permalink
Moved :console task out of Rakefile (to bin/console), refactored gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
kpumuk committed Sep 9, 2016
1 parent 6f0972c commit de3bd8c
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 46 deletions.
20 changes: 0 additions & 20 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,3 @@ RSpec::Core::RakeTask.new(:spec)

task test: :spec
task default: :spec

desc 'Starts irb with MetaTags gem loaded'
task :console do
require 'irb'

$:.unshift File.expand_path('../lib', __FILE__)
require 'meta_tags'
ARGV.clear
IRB.start
end

require 'yard'
YARD::Rake::YardocTask.new(:yard) do |t|
t.options = ['--title', 'MetaTags Documentation']
if ENV['PRIVATE']
t.options.concat ['--protected', '--private']
else
t.options.concat ['--protected', '--no-private']
end
end
14 changes: 14 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "meta_tags"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require "irb"
IRB.start
8 changes: 8 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx

bundle install

# Do any other automated setup that you need to do here
50 changes: 24 additions & 26 deletions meta-tags.gemspec
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path('../lib', __FILE__)
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'meta_tags/version'

Gem::Specification.new do |s|
s.name = 'meta-tags'
s.version = MetaTags::VERSION
s.platform = Gem::Platform::RUBY
s.license = "MIT"
s.authors = ['Dmytro Shteflyuk']
s.email = ['kpumuk@kpumuk.info']
s.homepage = 'http://github.com/kpumuk/meta-tags'
s.summary = %q{Collection of SEO helpers for Ruby on Rails.}
s.description = %q{Search Engine Optimization (SEO) plugin for Ruby on Rails applications.}
Gem::Specification.new do |spec|
spec.name = "meta-tags"
spec.version = MetaTags::VERSION
spec.authors = ["Dmytro Shteflyuk"]
spec.email = ["kpumuk@kpumuk.info"]

s.add_dependency 'actionpack', '>= 3.2.0'
spec.summary = %q{Collection of SEO helpers for Ruby on Rails.}
spec.description = %q{Search Engine Optimization (SEO) plugin for Ruby on Rails applications.}
spec.homepage = "http://github.com/kpumuk/meta-tags"
spec.license = "MIT"
spec.platform = Gem::Platform::RUBY

s.add_development_dependency 'rake'
s.add_development_dependency 'rspec', '~> 3.5.0'
s.add_development_dependency 'rspec-html-matchers'
s.add_development_dependency 'yard'
s.add_development_dependency 'bluecloth'
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

s.cert_chain = ['certs/kpumuk.pem']
s.signing_key = File.expand_path("~/.ssh/gem-kpumuk.pem") if $0 =~ /gem\z/
spec.add_dependency "actionpack", ">= 3.2.0", "<= 5.1.0"

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {spec}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.extra_rdoc_files = ['README.md', 'CHANGELOG.md']
s.rdoc_options = ['--charset=UTF-8']
s.require_paths = ['lib']
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.5.0"
spec.add_development_dependency "rspec-html-matchers", "~> 0.8.0"

spec.cert_chain = ["certs/kpumuk.pem"]
spec.signing_key = File.expand_path("~/.ssh/gem-kpumuk.pem") if $0 =~ /gem\z/
end

0 comments on commit de3bd8c

Please sign in to comment.