-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
98 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.bundle | ||
.ruby-* | ||
|
||
*.gem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require_relative '../lib/common' | ||
|
||
# bin/publish | ||
|
||
class Publish | ||
|
||
def start version, rvm=false | ||
system "rvm use #{rvm}" | ||
|
||
system "bundle && bundle exec rspec" | ||
system "gem build locomotivecms_common.gemspec" | ||
system "git tag -a v#{Locomotive::Common::VERSION} -m 'version #{Locomotive::Common::VERSION}'" | ||
system "git push --tags" | ||
system "gem push locomotivecms_common-#{Locomotive::Common::VERSION}.gem" | ||
system "git push origin master" | ||
end | ||
|
||
end | ||
|
||
if ARGV.length != 1 # or !ARGV[0].match(/\d{1,3}.\d{1,3}.\d{1,3}/) | ||
puts 'HELP: ' | ||
puts '$ bin/publish [ruby-2.1.1@common]' | ||
exit 0 | ||
end | ||
|
||
Publish.new.start ARGV[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,31 @@ | ||
require_relative 'locomotive/common/version' | ||
require_relative 'locomotive/common/logger' | ||
require_relative 'locomotive/common/exception' | ||
require_relative 'locomotive/common/notifier' | ||
|
||
require_relative 'locomotive/common/configuration' | ||
|
||
# module Locomotive | ||
# module Common | ||
# end | ||
# end | ||
begin | ||
require 'pry' | ||
rescue LoadError | ||
end | ||
|
||
module Locomotive | ||
module Common | ||
class << self | ||
attr_writer :configuration | ||
end | ||
|
||
def self.configuration | ||
@configuration ||= Configuration.new | ||
end | ||
|
||
def self.reset | ||
@configuration = Configuration.new | ||
end | ||
|
||
def self.configure | ||
yield(configuration) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Locomotive | ||
module Common | ||
|
||
class Configuration | ||
attr_accessor :notifier | ||
|
||
def initialize | ||
@notifier = Locomotive::Common::Notifier.new | ||
end | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Locomotive | ||
module Common | ||
|
||
class Notifier | ||
def method_missing method, *args | ||
nil | ||
end | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters