-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working towards gemifying and automatically reporting version.
- Loading branch information
1 parent
119f660
commit c83f8bd
Showing
4 changed files
with
63 additions
and
7 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 |
---|---|---|
@@ -1,8 +1 @@ | ||
source "http://rubygems.org/" | ||
|
||
gem "bundler" | ||
gem "rake" | ||
gem "minitest" | ||
gem "require_all" | ||
gem "constructor" | ||
gem "diy" |
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,34 @@ | ||
# -*- encoding: utf-8 -*- | ||
$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), 'lib')) | ||
require "lib/cmock_version" | ||
require 'date' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "cmock" | ||
s.version = CMockVersion::GEM | ||
s.platform = Gem::Platform::RUBY | ||
s.authors = ["Mark VanderVoord", "Michael Karlesky", "Greg Williams"] | ||
s.email = ["mark@vandervoord.net", "michael@karlesky.net", "barney.williams@gmail.com"] | ||
s.homepage = "http://throwtheswitch.org/cmock" | ||
s.summary = "CMock is a mocking framework for C unit testing. It's a member of the ThrowTheSwitch.org family of tools." | ||
s.description = <<-DESC | ||
CMock is a mocking framework for C unit testing. It accepts header files and generates mocks automagically for you. | ||
DESC | ||
s.licenses = ['MIT'] | ||
|
||
s.metadata = { | ||
"homepage_uri" => s.homepage, | ||
"bug_tracker_uri" => "https://github.com/ThrowTheSwitch/CMock/issues", | ||
"documentation_uri" => "https://github.com/ThrowTheSwitch/CMock/blob/master/docs/CMock_Summary.md", | ||
"mailing_list_uri" => "https://groups.google.com/forum/#!categories/throwtheswitch/cmock", | ||
"source_code_uri" => "https://github.com/ThrowTheSwitch/CMock" | ||
} | ||
|
||
s.required_ruby_version = ">= 3.0.0" | ||
|
||
s.files += Dir['**/*'] | ||
s.test_files = Dir['test/**/*'] | ||
s.executables = ['lib/cmock.rb'] | ||
|
||
s.require_paths = ["lib"] | ||
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,23 @@ | ||
|
||
module CMockVersion | ||
# Where is the header file from here? | ||
path = File.expand_path( File.join(File.dirname(__FILE__),"..","src","cmock.h") ) | ||
|
||
# Actually look up the version in the header file | ||
a = [0,0,0] | ||
begin | ||
File.readlines(path).each do |line| | ||
["VERSION_MAJOR", "VERSION_MINOR", "VERSION_BUILD"].each_with_index do |field, i| | ||
m = line.match(/CMOCK_#{field}\s+(\d+)/) | ||
a[i] = m[1] unless (m.nil?) | ||
end | ||
end | ||
rescue | ||
abort("Can't find my header file.") | ||
end | ||
|
||
# splat it to return the final value | ||
CMOCK_VERSION = "#{a.join(".")}" | ||
|
||
GEM = "0.32.0" | ||
end |