fresno 0.0.1-java
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +21 -0
- data/README.md +46 -0
- data/bin/fresno +47 -0
- metadata +80 -0
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) Tom Preston-Werner
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
Fresno
|
2
|
+
======
|
3
|
+
|
4
|
+
Fresno is a framework and generator for writing FRC controller code in [Mirah](http://mirah.org), a JVM language that compiles down to Java but offers a friendlier syntax.
|
5
|
+
|
6
|
+
Installation
|
7
|
+
------------
|
8
|
+
|
9
|
+
To get started, follow the instructions for setting up a Java environment in the [FRC Getting Started guide](http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2012_Assets/Getting%20Started%20with%20the%202012%20FRC%20Control%20System_2.pdf), including the updates for the Sun SPOT environment.
|
10
|
+
|
11
|
+
Once you have Java setup along with the FRC dependencies, hop over to the [JRuby website](http://jruby.org) and install the JRuby package. Mirah uses JRuby as its language for parsing and compiling to Java, and Fresno uses it to run the generator code.
|
12
|
+
|
13
|
+
To install Fresno, simply run `gem install fresno` (or `jgem install fresno`) with a JRuby powered installation of [RubyGems](http://rubygems.org), which should be installed by default with your JRuby package.
|
14
|
+
|
15
|
+
Generator usage
|
16
|
+
---------------
|
17
|
+
|
18
|
+
By default, Fresno's generator will create a directory structure and setup an [Ant](http://ant.apache.org) `build.xml` to build a project using WPILib's `IterativeRobot` class as its base. To create a project, simply execute:
|
19
|
+
|
20
|
+
fresno create MyRobot
|
21
|
+
|
22
|
+
...where MyRobot is the name of your robot/project. Fresno will then create a directory with the name of the robot/project and place inside of it a few files:
|
23
|
+
|
24
|
+
* A `LICENSE` file with a license for the code contained within. By default, this is the [MIT Open Source License](http://opensource.org/licenses/MIT), but feel free to change or delete that file, especially if you never plan to open source your code.
|
25
|
+
* A `LICENSE_FOR_WPI_LIB` file which contains the BSD license for all the WPILib code as required by its license.
|
26
|
+
* A `build.xml` and `build.properties` file for building with Ant. These are heavily based on the files from WPILib's Netbeans templates with a few alterations and clarifications.
|
27
|
+
* A `.gitignore` file to ignore build files when committing to a Git repository.
|
28
|
+
* A `README.md` file in Markdown format; you should definitely keep a current `README` for your project!
|
29
|
+
* A robot source file in `src`.
|
30
|
+
|
31
|
+
To build your robot's code, execute `ant compile`. To deploy a new release, execute `ant deploy`. If you're using Netbeans, you can add a Netbeans project file to your Fresno project with the `--netbeans` option:
|
32
|
+
|
33
|
+
fresno create MyRobot --netbeans
|
34
|
+
|
35
|
+
If you'd like to use `SimpleRobot` as your base rather than `IterativeRobot`, you can specify the `--simple` option to the generator:
|
36
|
+
|
37
|
+
fresno create MyRobot --simple
|
38
|
+
|
39
|
+
A command based template is coming soon!
|
40
|
+
|
41
|
+
Framework usage
|
42
|
+
---------------
|
43
|
+
|
44
|
+
Currently, the Fresno framework isn't hooked into anything, and in reality, it's only a single class right now.
|
45
|
+
|
46
|
+
Now that the generator is functional, features can begin to be added to the framework. In the future, the framework will be built at the time of the gem install and then subsequently added to the classpath at build time.
|
data/bin/fresno
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'thor'
|
4
|
+
|
5
|
+
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
6
|
+
require 'fresno'
|
7
|
+
|
8
|
+
class FresnoCommand < Thor
|
9
|
+
|
10
|
+
#####################
|
11
|
+
# create - Create a new project directory and populate it with some basics
|
12
|
+
#
|
13
|
+
|
14
|
+
desc "create [ProjectName]", "Generates a new Fresno project"
|
15
|
+
|
16
|
+
# Project templates
|
17
|
+
method_options :netbeans => false, :desc => "Include NetBeans project"
|
18
|
+
# TODO: Locate workable copy of Eclipse project...
|
19
|
+
# method_options :eclipse => false, :desc => "Include Eclipse project"
|
20
|
+
|
21
|
+
# Project skeletons
|
22
|
+
method_options :iterative => true, :desc => "Create a basic iterative robot project"
|
23
|
+
# TODO: Port and re-organize command driven code
|
24
|
+
# method_options :command => false, :desc => "Create a command driven robot project"
|
25
|
+
method_options :simple => false, :desc => "Create a 'simple' robot project"
|
26
|
+
|
27
|
+
def create(project_name)
|
28
|
+
Fresno::AppGenerator.new(@args, @options, @config).generate(project_name)
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
#####################
|
33
|
+
|
34
|
+
#####################
|
35
|
+
# version - Give us a good bit of version info so we can debug easier
|
36
|
+
#
|
37
|
+
|
38
|
+
desc "version", "Shows the current version of Fresno"
|
39
|
+
def version
|
40
|
+
puts "Fresno v.#{Fresno::VERSION} running on #{RUBY_ENGINE rescue 'MRI'} #{JRUBY_VERSION rescue RUBY_VERSION} (#{RUBY_PLATFORM})"
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
#####################
|
45
|
+
end
|
46
|
+
|
47
|
+
FresnoCommand.start
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fresno
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.1
|
6
|
+
platform: java
|
7
|
+
authors:
|
8
|
+
- Jeremy McAnally
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2012-11-10 00:00:00 -05:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: mirah
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: "0"
|
25
|
+
type: :runtime
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: contest
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: "0"
|
36
|
+
type: :development
|
37
|
+
version_requirements: *id002
|
38
|
+
description: Framework for scripting FRC bots with Mirah.
|
39
|
+
email: jeremy@github.com
|
40
|
+
executables:
|
41
|
+
- fresno
|
42
|
+
extensions: []
|
43
|
+
|
44
|
+
extra_rdoc_files:
|
45
|
+
- README.md
|
46
|
+
- LICENSE
|
47
|
+
files:
|
48
|
+
- bin/fresno
|
49
|
+
- README.md
|
50
|
+
- LICENSE
|
51
|
+
has_rdoc: true
|
52
|
+
homepage: http://github.com/jm/fresno
|
53
|
+
licenses: []
|
54
|
+
|
55
|
+
post_install_message:
|
56
|
+
rdoc_options:
|
57
|
+
- --charset=UTF-8
|
58
|
+
require_paths:
|
59
|
+
- lib
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: "0"
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: "0"
|
72
|
+
requirements: []
|
73
|
+
|
74
|
+
rubyforge_project: fresno
|
75
|
+
rubygems_version: 1.5.1
|
76
|
+
signing_key:
|
77
|
+
specification_version: 2
|
78
|
+
summary: Framework for scripting FRC bots.
|
79
|
+
test_files: []
|
80
|
+
|