Skip to content

Commit

Permalink
Project#file and Project#exposed_files no longer require the argument…
Browse files Browse the repository at this point in the history
… to be an array (can take multiple arguments instead). removed MyApplication::VERSION from the docs and instead used hard-coded number.
  • Loading branch information
bil-bas committed Feb 3, 2012
1 parent 9f9d1af commit a1d47a6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,11 @@
Releasy Change Log
==================

Next release
------------

* _Project#file_ and _Project#exposed_files_ no longer require the argument to be an array (can take multiple arguments instead).

v0.2.2
------

Expand Down
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -43,18 +43,15 @@ Example
require 'rubygems'
require 'bundler/setup' # Releasy doesn't require that your application uses bundler, but it does make things easier.
require 'releasy'
require 'lib/my_application/version'

#<<<
Releasy::Project.new do
name "My Application"
version MyApplication::VERSION
version "1.3.2"

executable "bin/my_application.rbw"
files `git ls-files`.split("\n")
files.exclude '.gitignore'

exposed_files ["README.html", "LICENSE.txt"]
files "lib/**/*.rb", "config/**/*.yml", "media/**/*.*"
exposed_files "README.html", "LICENSE.txt"
add_link "http://my_application.github.com", "My Application website"
exclude_encoding

Expand All @@ -72,6 +69,7 @@ Example

add_build :windows_folder do
icon "media/icon.ico"
executable_type :windows # Assuming you don't want it to run in a console window.
add_package :exe
end

Expand All @@ -80,11 +78,13 @@ Example
start_menu_group "Spooner Games"
readme "README.html" # User asked if they want to view readme after install.
license "LICENSE.txt" # User asked to read this and confirm before installing.
executable_type :windows # Assuming you don't want it to run in a console window.
add_package :zip
end

add_build :windows_wrapped do
wrapper "wrappers/ruby-1.9.3-p0-i386-mingw32.7z" # Assuming this is where you downloaded this file.
executable_type :windows # Assuming you don't want it to run in a console window.
exclude_tcl_tk
add_package :zip
end
Expand Down
11 changes: 5 additions & 6 deletions lib/releasy/project.rb
Expand Up @@ -14,13 +14,12 @@ module Releasy
# @example
# Releasy::Project.new do
# name "My Application"
# version MyApplication::VERSION
# version "1.2.4"
#
# executable "bin/my_application.rbw"
# files `git ls-files`.split("\n")
# files.exclude '.gitignore'
# files "lib/**/*.rb", "config/**/*.yml", "media/**/*.*"
#
# exposed_files ["README.html", "LICENSE.txt"]
# exposed_files "README.html", "LICENSE.txt"
# add_link "http://my_application.github.com", "My Application website"
# exclude_encoding
#
Expand Down Expand Up @@ -89,10 +88,10 @@ def create_md5s?; @create_md5s; end
protected :create_md5s?

def exposed_files; @exposed_files; end
def exposed_files=(files); @exposed_files = Rake::FileList.new files; end
def exposed_files=(*files); @exposed_files = Rake::FileList.new *files; end

def files; @files; end
def files=(files); @files = Rake::FileList.new files; end
def files=(*files); @files = Rake::FileList.new *files; end

# @return [String]
def to_s; "<#{self.class}#{name ? " #{name}" : ""}#{version ? " #{version}" : ""}>"; end
Expand Down
4 changes: 0 additions & 4 deletions test/yard_test.rb
Expand Up @@ -50,10 +50,6 @@ def process_method(method)
end
end

module MyApplication
VERSION = "1.2.2"
end

['README.md'].each do |filename|
context "#{filename} examples" do
File.read(filename).scan(/#<<<.*#>>>/m).each_with_index {|e, i| run_riot e, i, filename }
Expand Down

0 comments on commit a1d47a6

Please sign in to comment.