ironnails 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +7 -0
- data/Rakefile +20 -2
- data/VERSION +1 -1
- data/bin/ironnails +5 -0
- data/bin/ironnails.bat +3 -0
- data/generators/base_app/Gemfile +7 -0
- data/generators/base_app/Rakefile.tt +13 -0
- data/generators/base_app/app/controllers/application_controller.rb.tt +5 -0
- data/generators/base_app/app/controllers/default_controller.rb.tt +15 -0
- data/generators/base_app/app/converters/default_converter.rb.tt +14 -0
- data/generators/base_app/app/models/model_base.rb.tt +8 -0
- data/generators/base_app/app/views/main_window.xaml.tt +18 -0
- data/generators/base_app/assets/skins/default.xaml.tt +3 -0
- data/generators/base_app/blend_solution.sln.tt +19 -0
- data/generators/base_app/config/boot.rb.tt +45 -0
- data/generators/base_app/config/environment.rb.tt +26 -0
- data/generators/base_app/lib/main.rb.tt +8 -0
- data/generators/base_app/spec/spec_helper.rb.tt +5 -0
- data/generators/base_app/src/Properties/AssemblyInfo.cs.tt +55 -0
- data/generators/base_app/src/Properties/Resources.Designer.cs.tt +71 -0
- data/generators/base_app/src/Properties/Resources.resx +117 -0
- data/generators/base_app/src/Properties/Settings.Designer.cs.tt +30 -0
- data/generators/base_app/src/Properties/Settings.settings +7 -0
- data/generators/base_app/src/ironnails_controls.csproj.tt +84 -0
- data/generators/components/component_actions.rb +39 -0
- data/generators/components/tests/bacon_test_gen.rb +17 -0
- data/generators/components/tests/rspec_test_gen.rb +19 -0
- data/generators/generator_actions.rb +79 -0
- data/generators/skeleton_generator.rb +61 -0
- data/ironnails.gemspec +45 -4
- data/lib/ironnails.rb +1 -0
- data/lib/ironnails/config/configuration.rb +1 -2
- data/lib/ironnails/wpf_application.rb +2 -3
- metadata +79 -21
data/Gemfile
ADDED
data/Rakefile
CHANGED
@@ -11,11 +11,29 @@ applications with IronRuby and Windows Presentation Foundation (WPF).}
|
|
11
11
|
gem.email = "ivan@flanders.co.nz"
|
12
12
|
gem.homepage = "http://github.com/casualjim/ironnails"
|
13
13
|
gem.authors = ["Ivan Porto Carrero"]
|
14
|
+
gem.bindir = "bin"
|
15
|
+
gem.executables = ['ironnails']
|
16
|
+
gem.add_runtime_dependency "thor", "= 0.11.8"
|
17
|
+
gem.add_runtime_dependency "activesupport", ">= 2.3.5"
|
18
|
+
gem.add_runtime_dependency "bundler", "= 0.9.2"
|
19
|
+
gem.add_runtime_dependency "uuidtools", ">= 2.1.1"
|
14
20
|
gem.add_development_dependency "rspec", ">= 0"
|
15
|
-
gem.files = FileList["[A-Z]*", "{lib}/**/*"]
|
21
|
+
gem.files = FileList["[A-Z]*", "{lib,generators,bin}/**/*"]
|
16
22
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
17
23
|
end
|
18
24
|
Jeweler::GemcutterTasks.new
|
19
25
|
rescue LoadError
|
20
26
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
21
|
-
end
|
27
|
+
end
|
28
|
+
|
29
|
+
desc "Build the helpers project"
|
30
|
+
task :helpers do
|
31
|
+
puts "Building the helpers project"
|
32
|
+
system "msbuild /clp:ErrorsOnly;WarningsOnly /nologo ../IronNails.Library/IronNails.Library.csproj"
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Cleans and builds the helpers project"
|
36
|
+
task :rebuild_helpers do
|
37
|
+
puts "Reuilding the helpers project"
|
38
|
+
system "msbuild /clp:ErrorsOnly;WarningsOnly /t:Clean /nologo ../IronNails.Library/IronNails.Library.csproj"
|
39
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/bin/ironnails
ADDED
data/bin/ironnails.bat
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
desc "Build the helpers project"
|
2
|
+
task :helpers do
|
3
|
+
puts "Building the helpers project"
|
4
|
+
sln = ENV['SLN'] || Dir['./*.sln'].first
|
5
|
+
system "msbuild /clp:ErrorsOnly;WarningsOnly /nologo #{sln}"
|
6
|
+
end
|
7
|
+
|
8
|
+
desc "Runs the application"
|
9
|
+
task :run => :helpers do
|
10
|
+
sh "ir lib/main.rb"
|
11
|
+
end
|
12
|
+
|
13
|
+
task :default => :run
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module <%= @class_name %>
|
2
|
+
class DefaultConverter
|
3
|
+
|
4
|
+
include System::Windows::Data::IValueConverter
|
5
|
+
|
6
|
+
def convert(value, target_type, parameter, culture)
|
7
|
+
value
|
8
|
+
end
|
9
|
+
|
10
|
+
def convert_back(value, target_type, parameter, culture)
|
11
|
+
raise NotImplementedError
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<Window
|
2
|
+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
3
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
4
|
+
xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
|
5
|
+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
6
|
+
xmlns:nails="clr-namespace:IronNails.Library;assembly=IronNails.Library"
|
7
|
+
xmlns:controls="clr-namespace:<%= @class_name %>.Controls;assembly=<%= @class_name %>.Controls"
|
8
|
+
xmlns:nailsbehaviors="clr-namespace:IronNails.Library.Behaviors;assembly=IronNails.Library"
|
9
|
+
mc:Ignorable="d"
|
10
|
+
x:Name="Window"
|
11
|
+
Title="<%= @class_name %>"
|
12
|
+
Width="330" Height="570" MinWidth="200" MinHeight="200"
|
13
|
+
WindowStyle="SingleBorderWindow"
|
14
|
+
Left="100" Top="50">
|
15
|
+
|
16
|
+
<TextBlock Text="{Binding greeting}" />
|
17
|
+
|
18
|
+
</Window>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Microsoft Visual Studio Solution File, Format Version 10.00
|
2
|
+
# Visual Studio 2008
|
3
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "<%= @class_name %>.Controls", "src\<%= @class_name %>.Controls.csproj", "{<%= @guid %>}"
|
4
|
+
EndProject
|
5
|
+
Global
|
6
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
7
|
+
Debug|Any CPU = Debug|Any CPU
|
8
|
+
Release|Any CPU = Release|Any CPU
|
9
|
+
EndGlobalSection
|
10
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
11
|
+
{<%= @guid %>}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
12
|
+
{<%= @guid %>}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
13
|
+
{<%= @guid %>}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
14
|
+
{<%= @guid %>}.Release|Any CPU.Build.0 = Release|Any CPU
|
15
|
+
EndGlobalSection
|
16
|
+
GlobalSection(SolutionProperties) = preSolution
|
17
|
+
HideSolutionNode = FALSE
|
18
|
+
EndGlobalSection
|
19
|
+
EndGlobal
|
@@ -0,0 +1,45 @@
|
|
1
|
+
IRONNAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
2
|
+
|
3
|
+
# Helper method for file references.
|
4
|
+
# root_path("config", "settings.yml")
|
5
|
+
def root_path(*args)
|
6
|
+
File.join(IRONNAILS_ROOT, *args)
|
7
|
+
end
|
8
|
+
|
9
|
+
# Returns the full path to the assets folder along with any given additions
|
10
|
+
# assets_path("images")
|
11
|
+
def assets_path(*args)
|
12
|
+
root_path('assets', *args)
|
13
|
+
end
|
14
|
+
|
15
|
+
# Returns the full path to the assets folder along with any given additions
|
16
|
+
# assets_path("images")
|
17
|
+
def skins_path(*args)
|
18
|
+
assets_path('skins', *args)
|
19
|
+
end
|
20
|
+
|
21
|
+
begin
|
22
|
+
require 'ironnails'
|
23
|
+
rescue LoadError => le
|
24
|
+
require 'rubygems'
|
25
|
+
require 'ironnails'
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
module <%= @class_name %>
|
30
|
+
|
31
|
+
class Application < WpfApplication
|
32
|
+
# Attempts to require all dependencies with bundler, if this fails, bundle and then try again
|
33
|
+
def bundler_require_dependencies(environment='default')
|
34
|
+
require 'bundler'
|
35
|
+
Bundler.setup(environment.to_sym)
|
36
|
+
Bundler.require(environment.to_sym)
|
37
|
+
rescue LoadError => e
|
38
|
+
puts "Bundler must be run to resolve dependencies!"
|
39
|
+
system("cd #{ROOT_DIR}; bundle install")
|
40
|
+
puts "Retrying with dependencies resolved..."
|
41
|
+
retry
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/boot"
|
2
|
+
|
3
|
+
if File.exist? root_path("lib/<%= @class_name %>.Controls.dll")
|
4
|
+
require '<%= @class_name %>.Controls.dll'
|
5
|
+
include <%= @class_name %>::Controls
|
6
|
+
end
|
7
|
+
|
8
|
+
IronNails::Logging::CONSOLE_LOGGING = true
|
9
|
+
|
10
|
+
IronNails::Initializer.run do |config|
|
11
|
+
|
12
|
+
config.namespaces.concat %w(
|
13
|
+
IronNails
|
14
|
+
IronNails::Core
|
15
|
+
IronNails::Models
|
16
|
+
System::Diagnostics
|
17
|
+
System::Security
|
18
|
+
System::Globalization
|
19
|
+
System::Windows::Markup
|
20
|
+
System::Windows::Controls
|
21
|
+
System::Windows::Media
|
22
|
+
System::Windows::Media::Animation
|
23
|
+
System::Windows::Threading
|
24
|
+
System::Windows::Input
|
25
|
+
)
|
26
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
using System.Reflection;
|
2
|
+
using System.Resources;
|
3
|
+
using System.Runtime.CompilerServices;
|
4
|
+
using System.Runtime.InteropServices;
|
5
|
+
using System.Windows;
|
6
|
+
|
7
|
+
// General Information about an assembly is controlled through the following
|
8
|
+
// set of attributes. Change these attribute values to modify the information
|
9
|
+
// associated with an assembly.
|
10
|
+
[assembly: AssemblyTitle("<%= @class_name %>.Controls")]
|
11
|
+
[assembly: AssemblyDescription("")]
|
12
|
+
[assembly: AssemblyConfiguration("")]
|
13
|
+
[assembly: AssemblyCompany("ACME")]
|
14
|
+
[assembly: AssemblyProduct("<%= @class_name %>.Controls")]
|
15
|
+
[assembly: AssemblyCopyright("Copyright © ACME 2010")]
|
16
|
+
[assembly: AssemblyTrademark("")]
|
17
|
+
[assembly: AssemblyCulture("")]
|
18
|
+
|
19
|
+
// Setting ComVisible to false makes the types in this assembly not visible
|
20
|
+
// to COM components. If you need to access a type in this assembly from
|
21
|
+
// COM, set the ComVisible attribute to true on that type.
|
22
|
+
[assembly: ComVisible(false)]
|
23
|
+
|
24
|
+
//In order to begin building localizable applications, set
|
25
|
+
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
26
|
+
//inside a <PropertyGroup>. For example, if you are using US english
|
27
|
+
//in your source files, set the <UICulture> to en-US. Then uncomment
|
28
|
+
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
29
|
+
//the line below to match the UICulture setting in the project file.
|
30
|
+
|
31
|
+
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
32
|
+
|
33
|
+
|
34
|
+
[assembly: ThemeInfo(
|
35
|
+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
36
|
+
//(used if a resource is not found in the page,
|
37
|
+
// or application resource dictionaries)
|
38
|
+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
39
|
+
//(used if a resource is not found in the page,
|
40
|
+
// app, or any theme specific resource dictionaries)
|
41
|
+
)]
|
42
|
+
|
43
|
+
|
44
|
+
// Version information for an assembly consists of the following four values:
|
45
|
+
//
|
46
|
+
// Major Version
|
47
|
+
// Minor Version
|
48
|
+
// Build Number
|
49
|
+
// Revision
|
50
|
+
//
|
51
|
+
// You can specify all the values or you can default the Build and Revision Numbers
|
52
|
+
// by using the '*' as shown below:
|
53
|
+
// [assembly: AssemblyVersion("1.0.*")]
|
54
|
+
[assembly: AssemblyVersion("1.0.0.0")]
|
55
|
+
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@@ -0,0 +1,71 @@
|
|
1
|
+
//------------------------------------------------------------------------------
|
2
|
+
// <auto-generated>
|
3
|
+
// This code was generated by a tool.
|
4
|
+
// Runtime Version:2.0.50727.4927
|
5
|
+
//
|
6
|
+
// Changes to this file may cause incorrect behavior and will be lost if
|
7
|
+
// the code is regenerated.
|
8
|
+
// </auto-generated>
|
9
|
+
//------------------------------------------------------------------------------
|
10
|
+
|
11
|
+
namespace <%= @class_name %>.Controls.Properties
|
12
|
+
{
|
13
|
+
|
14
|
+
|
15
|
+
/// <summary>
|
16
|
+
/// A strongly-typed resource class, for looking up localized strings, etc.
|
17
|
+
/// </summary>
|
18
|
+
// This class was auto-generated by the StronglyTypedResourceBuilder
|
19
|
+
// class via a tool like ResGen or Visual Studio.
|
20
|
+
// To add or remove a member, edit your .ResX file then rerun ResGen
|
21
|
+
// with the /str option, or rebuild your VS project.
|
22
|
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
23
|
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
24
|
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
25
|
+
internal class Resources
|
26
|
+
{
|
27
|
+
|
28
|
+
private static global::System.Resources.ResourceManager resourceMan;
|
29
|
+
|
30
|
+
private static global::System.Globalization.CultureInfo resourceCulture;
|
31
|
+
|
32
|
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
33
|
+
internal Resources()
|
34
|
+
{
|
35
|
+
}
|
36
|
+
|
37
|
+
/// <summary>
|
38
|
+
/// Returns the cached ResourceManager instance used by this class.
|
39
|
+
/// </summary>
|
40
|
+
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
41
|
+
internal static global::System.Resources.ResourceManager ResourceManager
|
42
|
+
{
|
43
|
+
get
|
44
|
+
{
|
45
|
+
if ((resourceMan == null))
|
46
|
+
{
|
47
|
+
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IronNailsControlsTemplate.Properties.Resources", typeof(Resources).Assembly);
|
48
|
+
resourceMan = temp;
|
49
|
+
}
|
50
|
+
return resourceMan;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
/// <summary>
|
55
|
+
/// Overrides the current thread's CurrentUICulture property for all
|
56
|
+
/// resource lookups using this strongly typed resource class.
|
57
|
+
/// </summary>
|
58
|
+
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
59
|
+
internal static global::System.Globalization.CultureInfo Culture
|
60
|
+
{
|
61
|
+
get
|
62
|
+
{
|
63
|
+
return resourceCulture;
|
64
|
+
}
|
65
|
+
set
|
66
|
+
{
|
67
|
+
resourceCulture = value;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<root>
|
3
|
+
<!--
|
4
|
+
Microsoft ResX Schema
|
5
|
+
|
6
|
+
Version 2.0
|
7
|
+
|
8
|
+
The primary goals of this format is to allow a simple XML format
|
9
|
+
that is mostly human readable. The generation and parsing of the
|
10
|
+
various data types are done through the TypeConverter classes
|
11
|
+
associated with the data types.
|
12
|
+
|
13
|
+
Example:
|
14
|
+
|
15
|
+
... ado.net/XML headers & schema ...
|
16
|
+
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
17
|
+
<resheader name="version">2.0</resheader>
|
18
|
+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
19
|
+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
20
|
+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
21
|
+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
22
|
+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
23
|
+
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
24
|
+
</data>
|
25
|
+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
26
|
+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
27
|
+
<comment>This is a comment</comment>
|
28
|
+
</data>
|
29
|
+
|
30
|
+
There are any number of "resheader" rows that contain simple
|
31
|
+
name/value pairs.
|
32
|
+
|
33
|
+
Each data row contains a name, and value. The row also contains a
|
34
|
+
type or mimetype. Type corresponds to a .NET class that support
|
35
|
+
text/value conversion through the TypeConverter architecture.
|
36
|
+
Classes that don't support this are serialized and stored with the
|
37
|
+
mimetype set.
|
38
|
+
|
39
|
+
The mimetype is used for serialized objects, and tells the
|
40
|
+
ResXResourceReader how to depersist the object. This is currently not
|
41
|
+
extensible. For a given mimetype the value must be set accordingly:
|
42
|
+
|
43
|
+
Note - application/x-microsoft.net.object.binary.base64 is the format
|
44
|
+
that the ResXResourceWriter will generate, however the reader can
|
45
|
+
read any of the formats listed below.
|
46
|
+
|
47
|
+
mimetype: application/x-microsoft.net.object.binary.base64
|
48
|
+
value : The object must be serialized with
|
49
|
+
: System.Serialization.Formatters.Binary.BinaryFormatter
|
50
|
+
: and then encoded with base64 encoding.
|
51
|
+
|
52
|
+
mimetype: application/x-microsoft.net.object.soap.base64
|
53
|
+
value : The object must be serialized with
|
54
|
+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
55
|
+
: and then encoded with base64 encoding.
|
56
|
+
|
57
|
+
mimetype: application/x-microsoft.net.object.bytearray.base64
|
58
|
+
value : The object must be serialized into a byte array
|
59
|
+
: using a System.ComponentModel.TypeConverter
|
60
|
+
: and then encoded with base64 encoding.
|
61
|
+
-->
|
62
|
+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
63
|
+
<xsd:element name="root" msdata:IsDataSet="true">
|
64
|
+
<xsd:complexType>
|
65
|
+
<xsd:choice maxOccurs="unbounded">
|
66
|
+
<xsd:element name="metadata">
|
67
|
+
<xsd:complexType>
|
68
|
+
<xsd:sequence>
|
69
|
+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
70
|
+
</xsd:sequence>
|
71
|
+
<xsd:attribute name="name" type="xsd:string" />
|
72
|
+
<xsd:attribute name="type" type="xsd:string" />
|
73
|
+
<xsd:attribute name="mimetype" type="xsd:string" />
|
74
|
+
</xsd:complexType>
|
75
|
+
</xsd:element>
|
76
|
+
<xsd:element name="assembly">
|
77
|
+
<xsd:complexType>
|
78
|
+
<xsd:attribute name="alias" type="xsd:string" />
|
79
|
+
<xsd:attribute name="name" type="xsd:string" />
|
80
|
+
</xsd:complexType>
|
81
|
+
</xsd:element>
|
82
|
+
<xsd:element name="data">
|
83
|
+
<xsd:complexType>
|
84
|
+
<xsd:sequence>
|
85
|
+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
86
|
+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
87
|
+
</xsd:sequence>
|
88
|
+
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
89
|
+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
90
|
+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
91
|
+
</xsd:complexType>
|
92
|
+
</xsd:element>
|
93
|
+
<xsd:element name="resheader">
|
94
|
+
<xsd:complexType>
|
95
|
+
<xsd:sequence>
|
96
|
+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
97
|
+
</xsd:sequence>
|
98
|
+
<xsd:attribute name="name" type="xsd:string" use="required" />
|
99
|
+
</xsd:complexType>
|
100
|
+
</xsd:element>
|
101
|
+
</xsd:choice>
|
102
|
+
</xsd:complexType>
|
103
|
+
</xsd:element>
|
104
|
+
</xsd:schema>
|
105
|
+
<resheader name="resmimetype">
|
106
|
+
<value>text/microsoft-resx</value>
|
107
|
+
</resheader>
|
108
|
+
<resheader name="version">
|
109
|
+
<value>2.0</value>
|
110
|
+
</resheader>
|
111
|
+
<resheader name="reader">
|
112
|
+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
113
|
+
</resheader>
|
114
|
+
<resheader name="writer">
|
115
|
+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
116
|
+
</resheader>
|
117
|
+
</root>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
//------------------------------------------------------------------------------
|
2
|
+
// <auto-generated>
|
3
|
+
// This code was generated by a tool.
|
4
|
+
// Runtime Version:2.0.50727.4927
|
5
|
+
//
|
6
|
+
// Changes to this file may cause incorrect behavior and will be lost if
|
7
|
+
// the code is regenerated.
|
8
|
+
// </auto-generated>
|
9
|
+
//------------------------------------------------------------------------------
|
10
|
+
|
11
|
+
namespace <%= @class_name %>.Controls.Properties
|
12
|
+
{
|
13
|
+
|
14
|
+
|
15
|
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
16
|
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
|
17
|
+
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
18
|
+
{
|
19
|
+
|
20
|
+
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
21
|
+
|
22
|
+
public static Settings Default
|
23
|
+
{
|
24
|
+
get
|
25
|
+
{
|
26
|
+
return defaultInstance;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3
|
+
<PropertyGroup>
|
4
|
+
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
5
|
+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
6
|
+
<ProductVersion>9.0.30729</ProductVersion>
|
7
|
+
<SchemaVersion>2.0</SchemaVersion>
|
8
|
+
<ProjectGuid>{<%= @guid %>}</ProjectGuid>
|
9
|
+
<OutputType>library</OutputType>
|
10
|
+
<AppDesignerFolder>Properties</AppDesignerFolder>
|
11
|
+
<RootNamespace><%= @class_name %>.Controls</RootNamespace>
|
12
|
+
<AssemblyName><%= @class_name %>.Controls</AssemblyName>
|
13
|
+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
14
|
+
<FileAlignment>512</FileAlignment>
|
15
|
+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
16
|
+
<WarningLevel>4</WarningLevel>
|
17
|
+
</PropertyGroup>
|
18
|
+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
19
|
+
<DebugSymbols>true</DebugSymbols>
|
20
|
+
<DebugType>full</DebugType>
|
21
|
+
<Optimize>false</Optimize>
|
22
|
+
<OutputPath>..\lib\</OutputPath>
|
23
|
+
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
24
|
+
<ErrorReport>prompt</ErrorReport>
|
25
|
+
<WarningLevel>4</WarningLevel>
|
26
|
+
</PropertyGroup>
|
27
|
+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
28
|
+
<DebugType>pdbonly</DebugType>
|
29
|
+
<Optimize>true</Optimize>
|
30
|
+
<OutputPath>..\lib\</OutputPath>
|
31
|
+
<DefineConstants>TRACE</DefineConstants>
|
32
|
+
<ErrorReport>prompt</ErrorReport>
|
33
|
+
<WarningLevel>4</WarningLevel>
|
34
|
+
</PropertyGroup>
|
35
|
+
<ItemGroup>
|
36
|
+
<Reference Include="System" />
|
37
|
+
<Reference Include="System.Core">
|
38
|
+
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
39
|
+
</Reference>
|
40
|
+
<Reference Include="System.Xml.Linq">
|
41
|
+
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
42
|
+
</Reference>
|
43
|
+
<Reference Include="System.Data.DataSetExtensions">
|
44
|
+
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
45
|
+
</Reference>
|
46
|
+
<Reference Include="System.Data" />
|
47
|
+
<Reference Include="System.Xml" />
|
48
|
+
<Reference Include="WindowsBase" />
|
49
|
+
<Reference Include="PresentationCore" />
|
50
|
+
<Reference Include="PresentationFramework" />
|
51
|
+
</ItemGroup>
|
52
|
+
<ItemGroup>
|
53
|
+
<Compile Include="Properties\AssemblyInfo.cs">
|
54
|
+
<SubType>Code</SubType>
|
55
|
+
</Compile>
|
56
|
+
<Compile Include="Properties\Resources.Designer.cs">
|
57
|
+
<AutoGen>True</AutoGen>
|
58
|
+
<DesignTime>True</DesignTime>
|
59
|
+
<DependentUpon>Resources.resx</DependentUpon>
|
60
|
+
</Compile>
|
61
|
+
<Compile Include="Properties\Settings.Designer.cs">
|
62
|
+
<AutoGen>True</AutoGen>
|
63
|
+
<DependentUpon>Settings.settings</DependentUpon>
|
64
|
+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
65
|
+
</Compile>
|
66
|
+
<EmbeddedResource Include="Properties\Resources.resx">
|
67
|
+
<Generator>ResXFileCodeGenerator</Generator>
|
68
|
+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
69
|
+
</EmbeddedResource>
|
70
|
+
<None Include="Properties\Settings.settings">
|
71
|
+
<Generator>SettingsSingleFileGenerator</Generator>
|
72
|
+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
73
|
+
</None>
|
74
|
+
<AppDesigner Include="Properties\" />
|
75
|
+
</ItemGroup>
|
76
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
77
|
+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
78
|
+
Other similar extension points exist, see Microsoft.Common.targets.
|
79
|
+
<Target Name="BeforeBuild">
|
80
|
+
</Target>
|
81
|
+
<Target Name="AfterBuild">
|
82
|
+
</Target>
|
83
|
+
-->
|
84
|
+
</Project>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module IronNails
|
2
|
+
module ComponentActions
|
3
|
+
# Adds all the specified gems into the Gemfile for bundler
|
4
|
+
# require_dependencies 'activerecord'
|
5
|
+
# require_dependencies 'mocha', 'bacon', :group => :testing
|
6
|
+
def require_dependencies(*gem_names)
|
7
|
+
options = gem_names.extract_options!
|
8
|
+
gem_names.reverse.each { |lib| insert_into_gemfile(lib, options) }
|
9
|
+
end
|
10
|
+
|
11
|
+
# Inserts a required gem into the Gemfile to add the bundler dependency
|
12
|
+
# insert_into_gemfile(name)
|
13
|
+
# insert_into_gemfile(name, :group => :testing)
|
14
|
+
def insert_into_gemfile(name, options={})
|
15
|
+
after_pattern = "# Component requirements\n"
|
16
|
+
after_pattern = "# #{options[:group].to_s.capitalize} requirements\n" if group = options[:group]
|
17
|
+
include_text = "gem '#{name}'"
|
18
|
+
include_text << ", :require => #{options[:require].inspect}" if options[:require]
|
19
|
+
include_text << ", :group => #{group.inspect}" if group
|
20
|
+
include_text << "\n"
|
21
|
+
options.merge!(:content => include_text, :after => after_pattern)
|
22
|
+
inject_into_file('Gemfile', options[:content], :after => options[:after])
|
23
|
+
end
|
24
|
+
|
25
|
+
# Injects the test class text into the test_config file for setting up the test gen
|
26
|
+
# insert_test_suite_setup('...CLASS_NAME...')
|
27
|
+
# => inject_into_file("spec/spec_helper.rb", TEST.gsub(/CLASS_NAME/, @class_name), :after => "set :environment, :test\n")
|
28
|
+
def insert_test_suite_setup(suite_text, options={})
|
29
|
+
options.reverse_merge!(:path => "spec/spec_helper.rb", :after => /Spec configuration\n/)
|
30
|
+
inject_into_file(options[:path], suite_text.gsub(/CLASS_NAME/, @class_name), :after => options[:after])
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns space characters of given count
|
34
|
+
# indent_spaces(2)
|
35
|
+
def indent_spaces(count)
|
36
|
+
' ' * count
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module IronNails
|
2
|
+
module BaconTestGen
|
3
|
+
BACON_SETUP = <<-TEST
|
4
|
+
|
5
|
+
|
6
|
+
TEST
|
7
|
+
|
8
|
+
def setup_test
|
9
|
+
require_dependencies 'bacon', :group => :testing
|
10
|
+
insert_into_gemfile 'caricature', :require => 'caricature', :group => :testing
|
11
|
+
insert_test_suite_setup BACON_SETUP
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module IronNails
|
2
|
+
module RspecTestGen
|
3
|
+
RSPEC_SETUP = <<-TEST
|
4
|
+
\nSpec::Runner.configure do |config|
|
5
|
+
config.mock_with Caricature::RSpecAdapter
|
6
|
+
config.include Caricature::RSpecMatchers
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
TEST
|
11
|
+
|
12
|
+
def setup_test
|
13
|
+
insert_into_gemfile 'caricature', :require => 'caricature', :group => :testing
|
14
|
+
insert_into_gemfile 'rspec', :require => 'spec', :group => :testing
|
15
|
+
insert_test_suite_setup RSPEC_SETUP
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
module IronNails
|
2
|
+
module GeneratorActions
|
3
|
+
|
4
|
+
def self.included(base)
|
5
|
+
base.extend(ClassMethods)
|
6
|
+
end
|
7
|
+
|
8
|
+
# Performs the necessary generator for a given component choice
|
9
|
+
# execute_component_setup(:mock, 'rr')
|
10
|
+
def execute_component_setup(component, choice)
|
11
|
+
return true && say("Skipping generator for #{component} component...", :yellow) if choice.to_s == 'none'
|
12
|
+
say "Applying '#{choice}' (#{component})...", :yellow
|
13
|
+
self.class.send(:include, generator_module_for(choice, component))
|
14
|
+
send("setup_#{component}") if respond_to?("setup_#{component}")
|
15
|
+
end
|
16
|
+
|
17
|
+
# Prompts the user if necessary until a valid choice is returned for the component
|
18
|
+
# resolve_valid_choice(:mock) => 'rr'
|
19
|
+
def resolve_valid_choice(component)
|
20
|
+
available_string = self.class.available_choices_for(component).join(", ")
|
21
|
+
choice = options[component]
|
22
|
+
until valid_choice?(component, choice)
|
23
|
+
say("Option for --#{component} '#{choice}' is not available.", :red)
|
24
|
+
choice = ask("Please enter a valid option for #{component} (#{available_string}):")
|
25
|
+
end
|
26
|
+
choice
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns true if the option passed is a valid choice for component
|
30
|
+
# valid_option?(:mock, 'rr')
|
31
|
+
def valid_choice?(component, choice)
|
32
|
+
self.class.available_choices_for(component).include? choice.to_sym
|
33
|
+
end
|
34
|
+
|
35
|
+
# Returns the related module for a given component and option
|
36
|
+
# generator_module_for('rr', :mock)
|
37
|
+
def generator_module_for(choice, component)
|
38
|
+
"IronNails::#{choice.to_s.capitalize}#{component.to_s.capitalize}Gen".constantize
|
39
|
+
end
|
40
|
+
|
41
|
+
# Creates a component_config file at the destination containing all component options
|
42
|
+
# Content is a yamlized version of a hash containing component name mapping to chosen value
|
43
|
+
def store_component_config(destination)
|
44
|
+
create_file(destination) do
|
45
|
+
self.class.component_types.inject({}) { |result, component|
|
46
|
+
result[component] = options[component].to_s; result
|
47
|
+
}.to_yaml
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Loads the component config back into a hash
|
52
|
+
# i.e retrieve_component_config(...) => { :mock => 'rr', :test => 'riot', ... }
|
53
|
+
def retrieve_component_config(target)
|
54
|
+
YAML.load_file(target)
|
55
|
+
end
|
56
|
+
|
57
|
+
module ClassMethods
|
58
|
+
# Defines a class option to allow a component to be chosen and add to component type list
|
59
|
+
# Also builds the available_choices hash of which component choices are supported
|
60
|
+
# component_option :test, "Testing framework", :aliases => '-t', :choices => [:bacon, :shoulda]
|
61
|
+
def component_option(name, caption, options = {})
|
62
|
+
(@component_types ||= []) << name
|
63
|
+
(@available_choices ||= Hash.new({}))[name] = options[:choices]
|
64
|
+
description = "The #{caption} component (#{options[:choices].join(', ')})"
|
65
|
+
class_option name, :default => options[:choices].first, :aliases => options[:aliases], :desc => description
|
66
|
+
end
|
67
|
+
|
68
|
+
# Returns the compiled list of component types which can be specified
|
69
|
+
def component_types
|
70
|
+
@component_types
|
71
|
+
end
|
72
|
+
|
73
|
+
# Returns the list of available choices for the given component (including none)
|
74
|
+
def available_choices_for(component)
|
75
|
+
@available_choices[component] + [:none]
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'thor/group'
|
2
|
+
require 'uuidtools'
|
3
|
+
require 'fileutils'
|
4
|
+
require File.dirname(__FILE__) + '/generator_actions'
|
5
|
+
require File.dirname(__FILE__) + '/components/component_actions'
|
6
|
+
Dir[File.dirname(__FILE__) + "/{base_app,components}/**/*.rb"].each { |lib| require lib }
|
7
|
+
|
8
|
+
module IronNails
|
9
|
+
class SkeletonGenerator < Thor::Group
|
10
|
+
# Define the source template root
|
11
|
+
def self.source_root; File.dirname(__FILE__); end
|
12
|
+
def self.banner; "ironnails [app_name] [path] [options]"; end
|
13
|
+
|
14
|
+
# Include related modules
|
15
|
+
include Thor::Actions
|
16
|
+
include IronNails::GeneratorActions
|
17
|
+
include IronNails::ComponentActions
|
18
|
+
|
19
|
+
desc "Description:\n\n\tironnails is the ironnails generator which generates an application skeleton and later on components"
|
20
|
+
|
21
|
+
argument :name, :desc => "The name of your ironnails app"
|
22
|
+
argument :path, :desc => "The path to create your app", :default => "."
|
23
|
+
|
24
|
+
class_option :run_bundler, :aliases => '-b', :default => false, :type => :boolean
|
25
|
+
|
26
|
+
# Definitions for the available customizable components
|
27
|
+
# component_option :orm, "database engine", :aliases => '-d', :choices => [:datamapper, :mongomapper, :activerecord, :sequel, :couchrest]
|
28
|
+
component_option :test, "testing framework", :aliases => '-t', :choices => [:rspec, :bacon]
|
29
|
+
# component_option :mock, "mocking library", :aliases => '-m', :choices => [:caricature, :mocha, :rr]
|
30
|
+
|
31
|
+
# Copies over the base ironnails starting application
|
32
|
+
def setup_skeleton
|
33
|
+
self.destination_root = File.join(path, name)
|
34
|
+
@class_name = name.classify
|
35
|
+
@guid = UUIDTools::UUID.timestamp_create.to_s
|
36
|
+
directory("base_app/", self.destination_root)
|
37
|
+
copy_file File.join(self.destination_root, "blend_solution.sln"), File.join(self.destination_root, "#{@class_name}.sln")
|
38
|
+
copy_file File.join(self.destination_root, "src", "ironnails_controls.csproj"), File.join(self.destination_root, "src", "#{@class_name}.Controls.csproj")
|
39
|
+
remove_file File.join(self.destination_root, "blend_solution.sln")
|
40
|
+
remove_file File.join(self.destination_root, "src", "ironnails_controls.csproj")
|
41
|
+
|
42
|
+
store_component_config('.components')
|
43
|
+
end
|
44
|
+
|
45
|
+
# For each component, retrieve a valid choice and then execute the associated generator
|
46
|
+
def setup_components
|
47
|
+
self.class.component_types.each do |comp|
|
48
|
+
choice = resolve_valid_choice(comp)
|
49
|
+
execute_component_setup(comp, choice)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Bundle all required components using bundler and Gemfile
|
54
|
+
def bundle_dependencies
|
55
|
+
if options[:run_bundle]
|
56
|
+
say "Bundling application dependencies using bundler..."
|
57
|
+
in_root { run 'bundle install' }
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
data/ironnails.gemspec
CHANGED
@@ -5,17 +5,46 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ironnails}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ivan Porto Carrero"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-03-03}
|
13
|
+
s.default_executable = %q{ironnails}
|
13
14
|
s.description = %q{IronNails is a framework inspired by the Rails and rucola frameworks. It offers a rails-like way of developing
|
14
15
|
applications with IronRuby and Windows Presentation Foundation (WPF).}
|
15
16
|
s.email = %q{ivan@flanders.co.nz}
|
17
|
+
s.executables = ["ironnails"]
|
16
18
|
s.files = [
|
17
|
-
"
|
19
|
+
"Gemfile",
|
20
|
+
"Rakefile",
|
18
21
|
"VERSION",
|
22
|
+
"bin/ironnails",
|
23
|
+
"bin/ironnails.bat",
|
24
|
+
"generators/base_app/Gemfile",
|
25
|
+
"generators/base_app/Rakefile.tt",
|
26
|
+
"generators/base_app/app/controllers/application_controller.rb.tt",
|
27
|
+
"generators/base_app/app/controllers/default_controller.rb.tt",
|
28
|
+
"generators/base_app/app/converters/default_converter.rb.tt",
|
29
|
+
"generators/base_app/app/models/model_base.rb.tt",
|
30
|
+
"generators/base_app/app/views/main_window.xaml.tt",
|
31
|
+
"generators/base_app/assets/skins/default.xaml.tt",
|
32
|
+
"generators/base_app/blend_solution.sln.tt",
|
33
|
+
"generators/base_app/config/boot.rb.tt",
|
34
|
+
"generators/base_app/config/environment.rb.tt",
|
35
|
+
"generators/base_app/lib/main.rb.tt",
|
36
|
+
"generators/base_app/spec/spec_helper.rb.tt",
|
37
|
+
"generators/base_app/src/Properties/AssemblyInfo.cs.tt",
|
38
|
+
"generators/base_app/src/Properties/Resources.Designer.cs.tt",
|
39
|
+
"generators/base_app/src/Properties/Resources.resx",
|
40
|
+
"generators/base_app/src/Properties/Settings.Designer.cs.tt",
|
41
|
+
"generators/base_app/src/Properties/Settings.settings",
|
42
|
+
"generators/base_app/src/ironnails_controls.csproj.tt",
|
43
|
+
"generators/components/component_actions.rb",
|
44
|
+
"generators/components/tests/bacon_test_gen.rb",
|
45
|
+
"generators/components/tests/rspec_test_gen.rb",
|
46
|
+
"generators/generator_actions.rb",
|
47
|
+
"generators/skeleton_generator.rb",
|
19
48
|
"init.rb",
|
20
49
|
"ironnails.gemspec",
|
21
50
|
"lib/iron_nails.rb",
|
@@ -77,7 +106,7 @@ applications with IronRuby and Windows Presentation Foundation (WPF).}
|
|
77
106
|
s.homepage = %q{http://github.com/casualjim/ironnails}
|
78
107
|
s.rdoc_options = ["--charset=UTF-8"]
|
79
108
|
s.require_paths = ["lib"]
|
80
|
-
s.rubygems_version = %q{1.3.
|
109
|
+
s.rubygems_version = %q{1.3.5}
|
81
110
|
s.summary = %q{IronNails brings rails like development to IronRuby and WPF}
|
82
111
|
|
83
112
|
if s.respond_to? :specification_version then
|
@@ -85,11 +114,23 @@ applications with IronRuby and Windows Presentation Foundation (WPF).}
|
|
85
114
|
s.specification_version = 3
|
86
115
|
|
87
116
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
117
|
+
s.add_runtime_dependency(%q<thor>, ["= 0.11.8"])
|
118
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 2.3.5"])
|
119
|
+
s.add_runtime_dependency(%q<bundler>, ["= 0.9.2"])
|
120
|
+
s.add_runtime_dependency(%q<uuidtools>, [">= 2.1.1"])
|
88
121
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
89
122
|
else
|
123
|
+
s.add_dependency(%q<thor>, ["= 0.11.8"])
|
124
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.5"])
|
125
|
+
s.add_dependency(%q<bundler>, ["= 0.9.2"])
|
126
|
+
s.add_dependency(%q<uuidtools>, [">= 2.1.1"])
|
90
127
|
s.add_dependency(%q<rspec>, [">= 0"])
|
91
128
|
end
|
92
129
|
else
|
130
|
+
s.add_dependency(%q<thor>, ["= 0.11.8"])
|
131
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.5"])
|
132
|
+
s.add_dependency(%q<bundler>, ["= 0.9.2"])
|
133
|
+
s.add_dependency(%q<uuidtools>, [">= 2.1.1"])
|
93
134
|
s.add_dependency(%q<rspec>, [">= 0"])
|
94
135
|
end
|
95
136
|
end
|
data/lib/ironnails.rb
CHANGED
@@ -19,6 +19,7 @@ IRONNAILS_FRAMEWORKNAME = "IronNails Framework" unless defined?(IRONNAILS_FRAMEW
|
|
19
19
|
nails_vendor_lib = File.join(IRONNAILS_ROOT, "vendor/ironnails")
|
20
20
|
$:.unshift nails_vendor_lib if File.exist? nails_vendor_lib
|
21
21
|
$:.unshift File.expand_path(File.dirname(__FILE__))
|
22
|
+
$:.unshift File.expand_path(File.dirname(__FILE__) + "ironnails/bin")
|
22
23
|
|
23
24
|
%w(app/views app/helpers app/converters app/controllers app/models lib bin).each do |pth|
|
24
25
|
$:.unshift File.join(IRONNAILS_ROOT, pth)
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# A wrapper module that will contain all the relevant objects for our twitter application
|
2
1
|
module IronNails
|
3
2
|
|
4
3
|
# This structure has been heavily inspired by the rails framework.
|
@@ -131,7 +130,7 @@ module IronNails
|
|
131
130
|
Pathname.new(::IRONNAILS_ROOT).realpath.to_s
|
132
131
|
end
|
133
132
|
|
134
|
-
Object.const_set(:
|
133
|
+
Object.const_set(:RELATIVE_IRONNAILS_ROOT, ::IRONNAILS_ROOT.dup) unless defined?(::RELATIVE_IRONNAILS_ROOT)
|
135
134
|
|
136
135
|
::IRONNAILS_ROOT.replace @root_path
|
137
136
|
end
|
@@ -7,7 +7,6 @@ class WpfApplication < System::Windows::Application
|
|
7
7
|
def initialize(&b)
|
8
8
|
logger.debug "Starting application", IRONNAILS_FRAMEWORKNAME
|
9
9
|
@nails_engine = NailsEngine.new
|
10
|
-
#@nails_engine = TestViewManager.new
|
11
10
|
controller = instance_eval &b
|
12
11
|
nails_engine.register_controller controller
|
13
12
|
nails_engine.show_initial_window controller do |view_instance|
|
@@ -24,7 +23,7 @@ class WpfApplication < System::Windows::Application
|
|
24
23
|
self.resources.merged_dictionaries.add load_skin(name)
|
25
24
|
end
|
26
25
|
|
27
|
-
def load_skin(name)
|
28
|
-
XamlReader.load_from_path "#{
|
26
|
+
def load_skin(name=:default)
|
27
|
+
XamlReader.load_from_path skins_path("#{name}.xaml")
|
29
28
|
end
|
30
29
|
end
|
metadata
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ironnails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
version: 0.0.1
|
4
|
+
version: 0.0.3
|
10
5
|
platform: ruby
|
11
6
|
authors:
|
12
7
|
- Ivan Porto Carrero
|
@@ -14,34 +9,99 @@ autorequire:
|
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
11
|
|
17
|
-
date: 2010-
|
18
|
-
default_executable:
|
12
|
+
date: 2010-03-03 00:00:00 +01:00
|
13
|
+
default_executable: ironnails
|
19
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: thor
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - "="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.11.8
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: activesupport
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.3.5
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: bundler
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.9.2
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: uuidtools
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 2.1.1
|
54
|
+
version:
|
20
55
|
- !ruby/object:Gem::Dependency
|
21
56
|
name: rspec
|
22
|
-
|
23
|
-
|
57
|
+
type: :development
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
60
|
requirements:
|
25
61
|
- - ">="
|
26
62
|
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 0
|
29
63
|
version: "0"
|
30
|
-
|
31
|
-
version_requirements: *id001
|
64
|
+
version:
|
32
65
|
description: |-
|
33
66
|
IronNails is a framework inspired by the Rails and rucola frameworks. It offers a rails-like way of developing
|
34
67
|
applications with IronRuby and Windows Presentation Foundation (WPF).
|
35
68
|
email: ivan@flanders.co.nz
|
36
|
-
executables:
|
37
|
-
|
69
|
+
executables:
|
70
|
+
- ironnails
|
38
71
|
extensions: []
|
39
72
|
|
40
73
|
extra_rdoc_files: []
|
41
74
|
|
42
75
|
files:
|
76
|
+
- Gemfile
|
43
77
|
- Rakefile
|
44
78
|
- VERSION
|
79
|
+
- bin/ironnails
|
80
|
+
- bin/ironnails.bat
|
81
|
+
- generators/base_app/Gemfile
|
82
|
+
- generators/base_app/Rakefile.tt
|
83
|
+
- generators/base_app/app/controllers/application_controller.rb.tt
|
84
|
+
- generators/base_app/app/controllers/default_controller.rb.tt
|
85
|
+
- generators/base_app/app/converters/default_converter.rb.tt
|
86
|
+
- generators/base_app/app/models/model_base.rb.tt
|
87
|
+
- generators/base_app/app/views/main_window.xaml.tt
|
88
|
+
- generators/base_app/assets/skins/default.xaml.tt
|
89
|
+
- generators/base_app/blend_solution.sln.tt
|
90
|
+
- generators/base_app/config/boot.rb.tt
|
91
|
+
- generators/base_app/config/environment.rb.tt
|
92
|
+
- generators/base_app/lib/main.rb.tt
|
93
|
+
- generators/base_app/spec/spec_helper.rb.tt
|
94
|
+
- generators/base_app/src/Properties/AssemblyInfo.cs.tt
|
95
|
+
- generators/base_app/src/Properties/Resources.Designer.cs.tt
|
96
|
+
- generators/base_app/src/Properties/Resources.resx
|
97
|
+
- generators/base_app/src/Properties/Settings.Designer.cs.tt
|
98
|
+
- generators/base_app/src/Properties/Settings.settings
|
99
|
+
- generators/base_app/src/ironnails_controls.csproj.tt
|
100
|
+
- generators/components/component_actions.rb
|
101
|
+
- generators/components/tests/bacon_test_gen.rb
|
102
|
+
- generators/components/tests/rspec_test_gen.rb
|
103
|
+
- generators/generator_actions.rb
|
104
|
+
- generators/skeleton_generator.rb
|
45
105
|
- init.rb
|
46
106
|
- ironnails.gemspec
|
47
107
|
- lib/iron_nails.rb
|
@@ -112,20 +172,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
172
|
requirements:
|
113
173
|
- - ">="
|
114
174
|
- !ruby/object:Gem::Version
|
115
|
-
segments:
|
116
|
-
- 0
|
117
175
|
version: "0"
|
176
|
+
version:
|
118
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
178
|
requirements:
|
120
179
|
- - ">="
|
121
180
|
- !ruby/object:Gem::Version
|
122
|
-
segments:
|
123
|
-
- 0
|
124
181
|
version: "0"
|
182
|
+
version:
|
125
183
|
requirements: []
|
126
184
|
|
127
185
|
rubyforge_project:
|
128
|
-
rubygems_version: 1.3.
|
186
|
+
rubygems_version: 1.3.5
|
129
187
|
signing_key:
|
130
188
|
specification_version: 3
|
131
189
|
summary: IronNails brings rails like development to IronRuby and WPF
|