This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch whimsy-nogem in repository https://gitbox.apache.org/repos/asf/whimsy.git
commit 747403128111381b77c9a80e1e415cf506409c03 Author: Sebb <[email protected]> AuthorDate: Sat Aug 7 16:08:23 2021 +0100 Removal of Whimsy Gem code --- CONFIGURE.md | 3 --- DEVELOPMENT.md | 4 ++-- Gemfile | 2 -- Rakefile | 13 ------------- asf.gemspec | 34 ---------------------------------- asf.version | 1 - examples/Dockerfile | 1 - lib/Gemfile | 2 -- tools/Gemfile | 4 ---- www/board/agenda/Gemfile | 12 +----------- www/board/agenda/config.ru | 2 ++ www/board/agenda/models/agenda.rb | 4 ++-- www/committers/Gemfile | 4 ---- www/members/Gemfile | 4 ---- www/project/icla/Gemfile | 13 +------------ www/project/icla/config.ru | 2 ++ www/roster/Gemfile | 13 +------------ www/roster/config.ru | 2 ++ www/secretary/Gemfile | 9 +-------- www/secretary/workbench/Gemfile | 12 +----------- www/secretary/workbench/config.ru | 2 ++ www/status/Gemfile | 6 +----- www/treasurer/Gemfile | 4 ---- 23 files changed, 18 insertions(+), 135 deletions(-) diff --git a/CONFIGURE.md b/CONFIGURE.md index 177ea68..8bcc603 100644 --- a/CONFIGURE.md +++ b/CONFIGURE.md @@ -17,7 +17,6 @@ run either in a local environment or with a webserver. - [Wunderbar](https://github.com/rubys/wunderbar) - HTML Generator and CGI application support - [Ruby-ldap](https://github.com/bearded/ruby-ldap) - LDAP for Ruby - [nokogiri](https://github.com/sparklemotion/nokogiri) - HTML parser for Ruby - - Full gem dependencies in `asf.gemspec` ## Local Clients / Development @@ -40,8 +39,6 @@ Whimsy can be run on a client or in a local container for development use. and `/var/log/apache2/error_log` * **Development setup instructions** are in [DEVELOPMENT.md](DEVELOPMENT.md) and [MACOSX.md](MACOSX.md). - -* **whimsy-asf Gem** is a set of the core lib/whimsy/asf model as a normal Gem: [asf.gemspec](asf.gemspec) * **Tool-specific configurations** can be found in config/ directory diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 098870e..fab2c18 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -88,9 +88,9 @@ or read the [detailed MACOSX setup steps](MACOSX.md). 3. [Ruby Version Manager - rvm](https://rvm.io/) -2. **Install ruby gems:** `whimsy-asf` and `bundler`: +2. **Install ruby gems:** `bundler`: - `gem install whimsy-asf bundler` (mail and listen may be needed too) + `gem install bundler` (mail and listen may be needed too) - If you're using [Mac OS El Capitan or higher](MACOSX.md), you may need to do this: diff --git a/Gemfile b/Gemfile index cc7f05e..aa7d9b7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,4 @@ source 'https://rubygems.org' -root = '..' -gemspec gem 'mime-types' gem 'wunderbar' diff --git a/Rakefile b/Rakefile index 0ef9451..c29ca15 100644 --- a/Rakefile +++ b/Rakefile @@ -1,11 +1,5 @@ -require 'rubygems/package_task' require 'open3' -spec = eval(File.read('asf.gemspec')) -Gem::PackageTask.new(spec) do |pkg| - pkg.gem_spec = spec -end - def mkdir_p?(path) mkdir_p path unless Dir.exist? path end @@ -50,14 +44,7 @@ task :update, [:command] do |task, args| gemlines = Dir['**/Gemfile']. map {|file| File.read file}.join.scan(/^\s*gem\s.*/) - if File.exist? "asf.gemspec" - gemlines += - File.read("asf.gemspec").scan(/add_dependency\((.*)\)/). - map {|(line)| "gem #{line}"} - end - gems = gemlines.map {|line| [line[/['"](.*?)['"]/, 1], line.strip]}.to_h - gems['whimsy-asf'].sub! /,.*/, ", path: #{Dir.pwd.inspect}" # Also need to define version for wunderbar as per the asf.gemspec file require 'tmpdir' diff --git a/asf.gemspec b/asf.gemspec deleted file mode 100644 index 6ac263a..0000000 --- a/asf.gemspec +++ /dev/null @@ -1,34 +0,0 @@ -version = File.read(File.expand_path('../asf.version', __FILE__)).strip - -Gem::Specification.new do |s| - - # Change these as appropriate - s.name = "whimsy-asf" - s.license = 'Apache License, Version 2.0' - s.version = version - s.summary = "Whimsy 'model' of the ASF" - s.author = "Sam Ruby" - s.email = "[email protected]" - s.homepage = "https://whimsy.apache.org/" - s.description = <<-EOD - This package contains a set of classes which encapsulate access - to a number of data sources such as LDAP, ICLAs, auth lists, etc. - EOD - - # Add any extra files to include in the gem - s.files = Dir.glob(["asf.*", "lib/**/*"]) - s.require_paths = ["lib"] - - # If you want to depend on other gems, add them here, along with any - # relevant versions - s.add_dependency("nokogiri") - s.add_dependency("rack") - s.add_dependency("ruby-ldap") - s.add_dependency("tzinfo") - s.add_dependency("tzinfo-data") - s.add_dependency("wunderbar") - s.add_dependency("rdoc") - - # If your tests use any gems, include them here - # s.add_development_dependency("mocha") # for example -end diff --git a/asf.version b/asf.version deleted file mode 100644 index b76f49a..0000000 --- a/asf.version +++ /dev/null @@ -1 +0,0 @@ -0.0.77 diff --git a/examples/Dockerfile b/examples/Dockerfile index 2a3bce6..e1676b0 100644 --- a/examples/Dockerfile +++ b/examples/Dockerfile @@ -21,7 +21,6 @@ RUN apt-get install -y software-properties-common && \ apt-get install -y libsasl2-dev # board example -RUN gem install whimsy-asf RUN ruby -r whimsy/asf -e "ASF::LDAP.configure" ADD . /home/board WORKDIR /home/board diff --git a/lib/Gemfile b/lib/Gemfile index 6fd3ef8..bc81476 100644 --- a/lib/Gemfile +++ b/lib/Gemfile @@ -1,6 +1,5 @@ source 'https://rubygems.org' -root = '../..' # lib needs these at run-time gem 'json' gem 'nokogiri' @@ -11,6 +10,5 @@ gem 'pdf-reader' # For Travis testing group :test do - gem 'whimsy-asf', path: File.expand_path('..', __dir__) gem 'rspec' end diff --git a/tools/Gemfile b/tools/Gemfile index a9c2921..ee0eaec 100644 --- a/tools/Gemfile +++ b/tools/Gemfile @@ -1,8 +1,4 @@ source 'https://rubygems.org' -root = '../..' -asf_version = File.read(File.expand_path("#{root}/asf.version", __FILE__)).chomp -gem 'whimsy-asf', asf_version, path: File.expand_path(root, __FILE__) - gem 'builder' gem 'wunderbar' diff --git a/www/board/agenda/Gemfile b/www/board/agenda/Gemfile index 2c15597..c929d49 100644 --- a/www/board/agenda/Gemfile +++ b/www/board/agenda/Gemfile @@ -1,16 +1,6 @@ source 'https://rubygems.org' -root = '../../../..' -version_file = File.expand_path("#{root}/asf.version", __FILE__) -if File.exist? version_file - # for deployment and local testing - asf_version = File.read(version_file).chomp - gem 'whimsy-asf', asf_version, path: File.expand_path(root, __FILE__) -else - # for docker purposes (atleast for now) - gem 'whimsy-asf' -end - +gem 'ruby-ldap' gem 'rake' gem 'wunderbar' gem 'ruby2js' diff --git a/www/board/agenda/config.ru b/www/board/agenda/config.ru index 56cd74f..d19ea23 100644 --- a/www/board/agenda/config.ru +++ b/www/board/agenda/config.ru @@ -1,3 +1,5 @@ +$LOAD_PATH.unshift '/srv/whimsy/lib' + require 'whimsy/asf/rack' require File.expand_path('../main.rb', __FILE__) diff --git a/www/board/agenda/models/agenda.rb b/www/board/agenda/models/agenda.rb index de13d16..b8e825e 100755 --- a/www/board/agenda/models/agenda.rb +++ b/www/board/agenda/models/agenda.rb @@ -1,7 +1,7 @@ # Aggressively cache agendas. # -# Most of the heavy lifting is done by ASF::Board::Agenda in the whimsy-asf -# gem. This class is mainly focused on caching the results. +# Most of the heavy lifting is done by ASF::Board::Agenda +# This class is mainly focused on caching the results. # # This code also maintains a "working copy" of agendas when updates are # made that may not yet be reflected in the local svn checkout. diff --git a/www/committers/Gemfile b/www/committers/Gemfile index 65e7357..1392bca 100644 --- a/www/committers/Gemfile +++ b/www/committers/Gemfile @@ -1,8 +1,4 @@ source 'https://rubygems.org' -root = '../../..' -asf_version = File.read(File.expand_path("#{root}/asf.version", __FILE__)).chomp -gem 'whimsy-asf', asf_version, path: File.expand_path(root, __FILE__) - gem 'escape' gem 'wunderbar' diff --git a/www/members/Gemfile b/www/members/Gemfile index 8e4ca78..cbdf861 100644 --- a/www/members/Gemfile +++ b/www/members/Gemfile @@ -1,8 +1,4 @@ source 'https://rubygems.org' -root = '../../..' -asf_version = File.read(File.expand_path("#{root}/asf.version", __FILE__)).chomp -gem 'whimsy-asf', asf_version, path: File.expand_path(root, __FILE__) - gem 'mail' gem 'wunderbar' diff --git a/www/project/icla/Gemfile b/www/project/icla/Gemfile index c287548..18375ea 100644 --- a/www/project/icla/Gemfile +++ b/www/project/icla/Gemfile @@ -1,21 +1,10 @@ source 'https://rubygems.org' -root = '../../../..' -version_file = File.expand_path("#{root}/asf.version", __FILE__) - -if File.exist? version_file - # for deployment and local testing - asf_version = File.read(version_file).chomp - gem 'whimsy-asf', asf_version, path: File.expand_path(root, __FILE__) -else - # for docker purposes (at least for now) - gem 'whimsy-asf' -end - gem 'mail' gem 'rake' gem 'wunderbar' gem 'ruby2js' +gem 'ruby-ldap' gem 'sinatra' gem 'nokogumbo' gem 'execjs' diff --git a/www/project/icla/config.ru b/www/project/icla/config.ru index 09bbbdf..b8c306f 100644 --- a/www/project/icla/config.ru +++ b/www/project/icla/config.ru @@ -1,3 +1,5 @@ +$LOAD_PATH.unshift '/srv/whimsy/lib' + require File.expand_path('../main.rb', __FILE__) require 'whimsy/asf/rack' diff --git a/www/roster/Gemfile b/www/roster/Gemfile index a77beab..535d52d 100644 --- a/www/roster/Gemfile +++ b/www/roster/Gemfile @@ -1,18 +1,7 @@ source 'https://rubygems.org' -# Seems to be needed by server code -root = '../../..' -version_file = File.expand_path("#{root}/asf.version", __FILE__) -if File.exist? version_file - # for deployment and local testing - asf_version = File.read(version_file).chomp - gem 'whimsy-asf', asf_version, path: File.expand_path(root, __FILE__) -else - # for docker purposes (atleast for now) - gem 'whimsy-asf' -end - gem 'rake' +gem 'ruby-ldap' gem 'wunderbar' gem 'ruby2js' gem 'sinatra', '~> 2.0' diff --git a/www/roster/config.ru b/www/roster/config.ru index e988208..2dd2948 100644 --- a/www/roster/config.ru +++ b/www/roster/config.ru @@ -1,3 +1,5 @@ +$LOAD_PATH.unshift '/srv/whimsy/lib' + require File.expand_path('../main.rb', __FILE__) require 'whimsy/asf/rack' diff --git a/www/secretary/Gemfile b/www/secretary/Gemfile index 44bb1c6..8bf6c78 100644 --- a/www/secretary/Gemfile +++ b/www/secretary/Gemfile @@ -1,14 +1,7 @@ source 'https://rubygems.org' -root = '../../..' -version_file = File.expand_path("#{root}/asf.version", __FILE__) -if File.exist? version_file - # for deployment and local testing - asf_version = File.read(version_file).chomp - gem 'whimsy-asf', asf_version, path: File.expand_path(root, __FILE__) -end - gem 'ruby2js' +gem 'ruby-ldap' gem 'wunderbar' gem 'mail' gem 'mime-types' diff --git a/www/secretary/workbench/Gemfile b/www/secretary/workbench/Gemfile index d245ff0..c203b22 100644 --- a/www/secretary/workbench/Gemfile +++ b/www/secretary/workbench/Gemfile @@ -1,18 +1,8 @@ source 'https://rubygems.org' -root = '../../../..' -version_file = File.expand_path("#{root}/asf.version", __FILE__) -if File.exist? version_file - # for deployment and local testing - asf_version = File.read(version_file).chomp - gem 'whimsy-asf', asf_version, path: File.expand_path(root, __FILE__) -else - # for docker purposes (atleast for now) - gem 'whimsy-asf' -end - gem 'mail' gem 'rake' +gem 'ruby-ldap' gem 'zip' gem 'sinatra', '~> 2.0' gem 'sanitize' diff --git a/www/secretary/workbench/config.ru b/www/secretary/workbench/config.ru index c3157de..3e76d29 100644 --- a/www/secretary/workbench/config.ru +++ b/www/secretary/workbench/config.ru @@ -1,3 +1,5 @@ +$LOAD_PATH.unshift '/srv/whimsy/lib' + require File.expand_path('../server.rb', __FILE__) require 'whimsy/asf/rack' diff --git a/www/status/Gemfile b/www/status/Gemfile index 65324b0..29b8c35 100644 --- a/www/status/Gemfile +++ b/www/status/Gemfile @@ -1,10 +1,6 @@ source 'https://rubygems.org' -root = '../../..' -asf_version = File.read(File.expand_path("#{root}/asf.version", __FILE__)).chomp -gem 'whimsy-asf', asf_version, path: File.expand_path(root, __FILE__) - gem 'passenger' - +gem 'ruby-ldap' gem 'mime-types' gem 'wunderbar' diff --git a/www/treasurer/Gemfile b/www/treasurer/Gemfile index 65e7357..1392bca 100644 --- a/www/treasurer/Gemfile +++ b/www/treasurer/Gemfile @@ -1,8 +1,4 @@ source 'https://rubygems.org' -root = '../../..' -asf_version = File.read(File.expand_path("#{root}/asf.version", __FILE__)).chomp -gem 'whimsy-asf', asf_version, path: File.expand_path(root, __FILE__) - gem 'escape' gem 'wunderbar'
