Skip to content

Commit

Permalink
Don't need that fancy version code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ugisozols committed Nov 7, 2011
1 parent 0faa357 commit e3e168d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
5 changes: 2 additions & 3 deletions lib/gemspec.rb
@@ -1,15 +1,14 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require File.expand_path('../refinery/inquiries/version', __FILE__) require File.expand_path('../refinery/inquiries/version', __FILE__)
version = Refinery::Inquiries::Version.to_s
raise "Could not get version so gemspec can not be built" if version.nil?
files = Dir.glob("**/*").flatten.reject do |file| files = Dir.glob("**/*").flatten.reject do |file|
file =~ /\.gem$/ file =~ /\.gem$/
end end


gemspec = <<EOF gemspec = <<EOF
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = %q{refinerycms-inquiries} s.name = %q{refinerycms-inquiries}
s.version = %q{#{version}} s.version = %q{#{Refinery::Inquiries::VERSION}}
s.date = %q{#{Time.now.strftime('%Y-%m-%d')}} s.date = %q{#{Time.now.strftime('%Y-%m-%d')}}
s.summary = %q{Inquiry handling functionality for the Refinery CMS project.} s.summary = %q{Inquiry handling functionality for the Refinery CMS project.}
s.description = %q{Inquiry handling functionality extracted from Refinery CMS to allow you to have a contact form and manage inquiries in the Refinery backend.} s.description = %q{Inquiry handling functionality extracted from Refinery CMS to allow you to have a contact form and manage inquiries in the Refinery backend.}
Expand Down
6 changes: 0 additions & 6 deletions lib/refinery/inquiries.rb
Expand Up @@ -5,19 +5,13 @@ module Refinery
module Inquiries module Inquiries
require 'refinery/inquiries/engine' if defined?(Rails) require 'refinery/inquiries/engine' if defined?(Rails)


autoload :Version, 'refinery/inquiries/version'

class << self class << self
attr_writer :root attr_writer :root


def root def root
@root ||= Pathname.new(File.expand_path('../../../', __FILE__)) @root ||= Pathname.new(File.expand_path('../../../', __FILE__))
end end


def version
Refinery::Inquiries::Version.to_s
end

def factory_paths def factory_paths
@factory_paths ||= [ root.join("spec/factories").to_s ] @factory_paths ||= [ root.join("spec/factories").to_s ]
end end
Expand Down
14 changes: 1 addition & 13 deletions lib/refinery/inquiries/version.rb
@@ -1,17 +1,5 @@
module Refinery module Refinery
module Inquiries module Inquiries
class Version VERSION = "2.0.0"
@major = 2
@minor = 0
@tiny = 0

class << self
attr_reader :major, :minor, :tiny

def to_s
[@major, @minor, @tiny].compact.join('.')
end
end
end
end end
end end

0 comments on commit e3e168d

Please sign in to comment.