encodingof 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "http://rubygems.org"
2
+ gemspec
@@ -0,0 +1,14 @@
1
+ #require "bundler/gem_tasks"
2
+
3
+ require 'rake'
4
+ require 'rdoc/task'
5
+ require 'fileutils'
6
+
7
+ task :test => :spec
8
+
9
+ task :default => :spec
10
+
11
+ require "rspec/core/rake_task"
12
+ RSpec::Core::RakeTask.new(:spec) do |t|
13
+ t.rspec_opts = '--backtrace --color'
14
+ end
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
4
+
5
+ help = <<HELP
6
+ A command line utility for discovering file encoding
7
+
8
+ Basic Command Line Usage:
9
+ encodingof # launch this panel
10
+ encodingof file.rb index.html # list the encoding of each file
11
+
12
+ HELP
13
+
14
+ require 'encodingof'
15
+
16
+ if ARGV.size.zero?
17
+ puts help
18
+ else
19
+ Encodingof.tell(ARGV)
20
+ end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "encodingof/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "encodingof"
7
+ s.version = Encodingof::VERSION
8
+ s.authors = ["Rodrigo Vieira"]
9
+ s.email = ["rodrigovieira1994@gmail.com"]
10
+ s.homepage = "http://www.rodrigoalvesvieira.com/encodingof"
11
+ s.summary = %q{A command line utility for discovering file encoding}
12
+ s.description = %q{A Ruby command line utility for discovering file encoding}
13
+ s.rubyforge_project = "encodingof"
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = ["encodingof"]
17
+ s.require_paths = ["lib"]
18
+
19
+ s.add_dependency("rspec", ">=2")
20
+ end
@@ -0,0 +1,9 @@
1
+ require "encodingof/version"
2
+
3
+ module Encodingof
4
+ def self.tell(files)
5
+ files.each do |source_file|
6
+ puts "#{File.basename(source_file)} encoded with #{File.open(source_file).read.encoding}"
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module Encodingof
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: encodingof
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Rodrigo Vieira
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-12-21 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &70119338361580 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '2'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70119338361580
25
+ description: A Ruby command line utility for discovering file encoding
26
+ email:
27
+ - rodrigovieira1994@gmail.com
28
+ executables:
29
+ - encodingof
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - .gitignore
34
+ - Gemfile
35
+ - Rakefile
36
+ - encodingof.gemspec
37
+ - lib/encodingof.rb
38
+ - lib/encodingof/version.rb
39
+ - bin/encodingof
40
+ homepage: http://www.rodrigoalvesvieira.com/encodingof
41
+ licenses: []
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project: encodingof
60
+ rubygems_version: 1.8.11
61
+ signing_key:
62
+ specification_version: 3
63
+ summary: A command line utility for discovering file encoding
64
+ test_files: []