Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

first commit

  • Loading branch information...
commit 45f4c41536768c924bbd766ee802e74b20f2579e 0 parents
@txus authored
6 .gitignore
@@ -0,0 +1,6 @@
+*.gem
+.bundle
+pkg/*
+graph.png
+.yardoc/*
+doc/*
1  .rvmrc
@@ -0,0 +1 @@
+rvm --create use ruby-1.9.2@brainscript
4 Gemfile
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in brainscript.gemspec
+gemspec
26 Gemfile.lock
@@ -0,0 +1,26 @@
+PATH
+ remote: .
+ specs:
+ brainscript (0.0.1)
+ parslet
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ blankslate (2.1.2.4)
+ bluecloth (2.1.0)
+ minitest (2.1.0)
+ mocha (0.9.12)
+ parslet (1.2.0)
+ blankslate (~> 2.0)
+ yard (0.6.8)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bluecloth
+ brainscript!
+ minitest
+ mocha
+ yard
50 Rakefile
@@ -0,0 +1,50 @@
+require 'bundler'
+Bundler::GemHelper.install_tasks
+
+require 'rake/testtask'
+Rake::TestTask.new do |t|
+ t.libs << "test"
+ t.test_files = FileList['test/**/*_test.rb']
+ t.verbose = true
+end
+
+require 'yard'
+YARD::Rake::YardocTask.new(:docs) do |t|
+ t.files = ['lib/**/*.rb']
+ t.options = ['-m', 'markdown', '--no-private', '-r', 'Readme.md', '--title', 'Brainscript documentation']
+end
+
+site = 'doc'
+source_branch = 'master'
+deploy_branch = 'gh-pages'
+
+desc "generate and deploy documentation website to github pages"
+multitask :pages do
+ puts ">>> Deploying #{deploy_branch} branch to Github Pages <<<"
+ require 'git'
+ repo = Git.open('.')
+ puts "\n>>> Checking out #{deploy_branch} branch <<<\n"
+ repo.branch("#{deploy_branch}").checkout
+ (Dir["*"] - [site]).each { |f| rm_rf(f) }
+ Dir["#{site}/*"].each {|f| mv(f, "./")}
+ rm_rf(site)
+ puts "\n>>> Moving generated site files <<<\n"
+ Dir["**/*"].each {|f| repo.add(f) }
+ repo.status.deleted.each {|f, s| repo.remove(f)}
+ puts "\n>>> Commiting: Site updated at #{Time.now.utc} <<<\n"
+ message = ENV["MESSAGE"] || "Site updated at #{Time.now.utc}"
+ repo.commit(message)
+ puts "\n>>> Pushing generated site to #{deploy_branch} branch <<<\n"
+ repo.push
+ puts "\n>>> Github Pages deploy complete <<<\n"
+ repo.branch("#{source_branch}").checkout
+end
+
+task :doc => [:docs]
+
+desc "Generate and open class diagram (needs Graphviz installed)"
+task :graph do |t|
+ `bundle exec yard graph -d --full --no-private | dot -Tpng -o graph.png && open graph.png`
+end
+
+task :default => :test
33 Readme.md
@@ -0,0 +1,33 @@
+#brainscript
+
+Brainscript is a scripting language that compiles to clean, readable Brainfuck.
+
+This project is inspired by Jeremy Ashkenas' [CoffeeScript](https://github.com/jashkenas/coffee-script).
+
+Its purpose is to demonstrate some of the architectural principles specified
+in the FTL specification. Also, FTL stands for *for the lulz*.
+
+Brainscript is currently under intensive development. It certainly does **not** work.
+
+##Under the hood
+
+Run the test suite by typing:
+
+ rake
+
+You can also build the documentation with the following command:
+
+ rake docs
+
+## Note on Patches/Pull Requests
+
+* Fork the project.
+* Make your feature addition or bug fix.
+* Add tests for it. This is important so I don't break it in a
+ future version unintentionally.
+* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
+* Send us a pull request. Bonus points for topic branches.
+
+## Copyright
+
+Copyright (c) 2011 Josep M. Bach. See LICENSE for details.
27 brainscript.gemspec
@@ -0,0 +1,27 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "brainscript/version"
+
+Gem::Specification.new do |s|
+ s.name = "brainscript"
+ s.version = Brainscript::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Josep M. Bach"]
+ s.email = ["josep.m.bach@gmail.com"]
+ s.homepage = "http://github.com/txus/brainscript"
+ s.summary = %q{Brainscript is a scripting language that compiles to clean, readable Brainfuck.}
+ s.description = %q{Brainscript is a scripting language that compiles to clean, readable Brainfuck.}
+
+ s.rubyforge_project = "brainscript"
+
+ s.add_runtime_dependency 'parslet'
+ s.add_development_dependency 'minitest'
+ s.add_development_dependency 'mocha'
+ s.add_development_dependency 'yard'
+ s.add_development_dependency 'bluecloth'
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+end
3  lib/brainscript.rb
@@ -0,0 +1,3 @@
+module Brainscript
+ # Your code goes here...
+end
3  lib/brainscript/version.rb
@@ -0,0 +1,3 @@
+module Brainscript
+ VERSION = "0.0.1"
+end
9 test/brainscript_test.rb
@@ -0,0 +1,9 @@
+require 'test_helper'
+
+class BrainscriptTest < MiniTest::Unit::TestCase
+
+ def test_assert_works
+ assert true
+ end
+
+end
5 test/test_helper.rb
@@ -0,0 +1,5 @@
+gem 'minitest'
+require 'minitest/autorun'
+require 'mocha'
+
+require 'brainscript'
Please sign in to comment.
Something went wrong with that request. Please try again.